2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr28045.c
blobf2d16646ca269fddc5499084120a2cf3ad366187
1 /* { dg-do run } */
3 extern void abort(void);
4 struct a
6 unsigned int bits : 1;
7 signed long val : ((sizeof(long) * 8) - 1);
8 };
9 int Fnegate (struct a b)
11 if ((-((long)b.val)) <= ((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))
12 && (-((long)b.val)) >= (-(((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))) - 1))
13 return 0 ;
14 abort ();
16 int main ()
18 struct a b = {1, 1};
19 Fnegate (b);
20 return 0;