PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr30778.c
blob2a930e63f33d78b93068737bd23298fa3811e230
1 extern void *memset (void *, int, __SIZE_TYPE__);
2 extern void abort (void);
4 struct reg_stat {
5 void *last_death;
6 void *last_set;
7 void *last_set_value;
8 int last_set_label;
9 char last_set_sign_bit_copies;
10 int last_set_mode : 8;
11 char last_set_invalid;
12 char sign_bit_copies;
13 long nonzero_bits;
16 static struct reg_stat *reg_stat;
18 void __attribute__((noinline))
19 init_reg_last (void)
21 memset (reg_stat, 0, __builtin_offsetof (struct reg_stat, sign_bit_copies));
24 int main (void)
26 struct reg_stat r;
28 reg_stat = &r;
29 r.nonzero_bits = -1;
30 init_reg_last ();
31 if (r.nonzero_bits != -1)
32 abort ();
33 return 0;