libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr103544.c
blobc8bdee86e779561d3c5b0426a16c047fcafe4e0d
1 /* { dg-do compile } */
2 /* { dg-additional-options "-O3" } */
3 /* { dg-additional-options "-march=haswell" { target x86_64-*-* i?86-*-* } } */
5 int crash_me(char* ptr, unsigned long size)
7 short result[16] = {0};
9 unsigned long no_iters = 0;
10 for(unsigned long i = 0; i < size - 12; i+= 13){
11 for(unsigned long j = 0; j < 12; j++){
12 result[j] += ptr[i + j] - '0';
14 no_iters++;
17 int result_int = 0;
18 for(int j = 0; j < 12; j++){
19 int bit_value = result[j] > no_iters/2 ? 1 : 0;
20 result_int |= bit_value;
23 return result_int;