PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20090527-1.c
blobd8e3711cdf6375d7c1cec4e9a948af3d5bbce6db
1 typedef enum { POSITION_ASIS, POSITION_UNSPECIFIED } unit_position;
3 typedef enum { STATUS_UNKNOWN, STATUS_UNSPECIFIED } unit_status;
5 typedef struct
7 unit_position position;
8 unit_status status;
9 } unit_flags;
11 extern void abort (void);
13 void
14 new_unit (unit_flags * flags)
16 if (flags->status == STATUS_UNSPECIFIED)
17 flags->status = STATUS_UNKNOWN;
19 if (flags->position == POSITION_UNSPECIFIED)
20 flags->position = POSITION_ASIS;
22 switch (flags->status)
24 case STATUS_UNKNOWN:
25 break;
27 default:
28 abort ();
32 int main()
34 unit_flags f;
35 f.status = STATUS_UNSPECIFIED;
36 new_unit (&f);
37 return 0;