gcc/testsuite/gcc.dg/torture/pr70450.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-require-effective-target lp64 } */ |
| 3 | |
| 4 | unsigned long int a = 2UL; |
| 5 | int b = 2; |
| 6 | unsigned long int c = 2UL; |
| 7 | |
| 8 | void foo () |
| 9 | { |
| 10 | c = 2 * ((2 * a) * (2 * (-b))); |
| 11 | } |
| 12 | |
| 13 | int main () |
| 14 | { |
| 15 | foo(); |
| 16 | if (c != 18446744073709551584UL) |
| 17 | __builtin_abort(); |
| 18 | return 0; |
| 19 | } |