Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/pr28403.c

raw
1 void abort (void);
2 void exit (int);
3
4 typedef unsigned long long ull;
5 int global;
6
7 int __attribute__((noinline))
8 foo (int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8)
9 {
10 global = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
11 }
12
13 ull __attribute__((noinline))
14 bar (ull x)
15 {
16 foo (1, 2, 1, 3, 1, 4, 1, 5);
17 return x >> global;
18 }
19
20 int
21 main (void)
22 {
23 if (bar (0x123456789abcdefULL) != (0x123456789abcdefULL >> 18))
24 abort ();
25 exit (0);
26 }