diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr70450.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr70450.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr70450.c b/gcc/testsuite/gcc.dg/torture/pr70450.c new file mode 100644 index 00000000000..ee5e24d0522 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr70450.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-require-effective-target lp64 } */ + +unsigned long int a = 2UL; +int b = 2; +unsigned long int c = 2UL; + +void foo () +{ + c = 2 * ((2 * a) * (2 * (-b))); +} + +int main () +{ + foo(); + if (c != 18446744073709551584UL) + __builtin_abort(); + return 0; +} |