gcc/testsuite/gcc.c-torture/execute/pr78726.c
raw| 1 | /* PR tree-optimization/78726 */ |
| 2 | |
| 3 | unsigned char b = 36, c = 173; |
| 4 | unsigned int d; |
| 5 | |
| 6 | __attribute__((noinline, noclone)) void |
| 7 | foo (void) |
| 8 | { |
| 9 | unsigned a = ~b; |
| 10 | d = a * c * c + 1023094746U * a; |
| 11 | } |
| 12 | |
| 13 | int |
| 14 | main () |
| 15 | { |
| 16 | if (__SIZEOF_INT__ != 4 || __CHAR_BIT__ != 8) |
| 17 | return 0; |
| 18 | asm volatile ("" : : "g" (&b), "g" (&c) : "memory"); |
| 19 | foo (); |
| 20 | if (d != 799092689U) |
| 21 | __builtin_abort (); |
| 22 | return 0; |
| 23 | } |