Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/941015-1.c

raw
1 void abort (void);
2 void exit (int);
3
4 int
5 foo1 (value)
6 long long value;
7 {
8 register const long long constant = 0xc000000080000000LL;
9
10 if (value < constant)
11 return 1;
12 else
13 return 2;
14 }
15
16 int
17 foo2 (value)
18 unsigned long long value;
19 {
20 register const unsigned long long constant = 0xc000000080000000LL;
21
22 if (value < constant)
23 return 1;
24 else
25 return 2;
26 }
27
28 int
29 main (void)
30 {
31 unsigned long long value = 0xc000000000000001LL;
32 int x, y;
33
34 x = foo1 (value);
35 y = foo2 (value);
36 if (x != y || x != 1)
37 abort ();
38 exit (0);
39 }