Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr28045.c

raw
1 /* { dg-do run } */
2
3 extern void abort(void);
4 struct a
5 {
6 unsigned int bits : 1;
7 signed long val : ((sizeof(long) * 8) - 1);
8 };
9 int Fnegate (struct a b)
10 {
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 ();
15 }
16 int main ()
17 {
18 struct a b = {1, 1};
19 Fnegate (b);
20 return 0;
21 }
22