2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr38405.c
blob3f93445cd65668cf1525269ede1fed3c492f6dd5
1 /* { dg-do run } */
3 extern void abort ();
4 extern int printf (char *__format, ...);
6 struct vpiBinaryConst {
7 int signed_flag :1;
8 int sized_flag :1;
9 };
11 int binary_get(int code, struct vpiBinaryConst *rfp)
13 switch (code) {
14 case 1:
15 return rfp->signed_flag ? 1 : 0;
16 default:
17 printf("error: %d not supported\n", code);
18 return code;
22 int main(void)
24 struct vpiBinaryConst x={1,0};
25 int y=binary_get(1, &x);
26 if (y!=1)
27 abort ();
28 return 0;