diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr61095.c | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c93294a..ce196b0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-05-08 Richard Sandiford <rdsandiford@googlemail.com> + + PR tree-optimization/61095 + * gcc.dg/torture/pr61095.c: New test. + 2014-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com> PR middle-end/39246 diff --git a/gcc/testsuite/gcc.dg/torture/pr61095.c b/gcc/testsuite/gcc.dg/torture/pr61095.c new file mode 100644 index 0000000..fa584e0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr61095.c @@ -0,0 +1,23 @@ +/* { dg-do run } */ +/* { dg-require-effective-target lp64 } */ + +extern void __attribute__ ((noreturn)) abort (void); + +int __attribute__ ((noinline, noclone)) +foo (unsigned long addr) { + unsigned long *p = (unsigned long*)((addr & 0xffff83fffffffff8UL) * 4); + unsigned long xxx = (unsigned long)(p + 1); + return xxx >= 0x3c000000000UL; +} + +int +main (void) +{ + if (foo (0)) + abort (); + if (foo (0x7c0000000000UL)) + abort (); + if (!foo (0xfc0000000000UL)) + abort (); + return 0; +} |