diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-05-08 08:00:21 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-05-08 08:00:21 +0000 |
commit | c7ad35388d4738e3b981c4dbdbf5cbfe7b441c95 (patch) | |
tree | b5ba86a81dc0c95958bfc81576ab3269c7e97871 /gcc | |
parent | ca49b74e1caf638d0ef862551b6ff0bfe779d137 (diff) | |
download | gcc-c7ad35388d4738e3b981c4dbdbf5cbfe7b441c95.zip gcc-c7ad35388d4738e3b981c4dbdbf5cbfe7b441c95.tar.gz gcc-c7ad35388d4738e3b981c4dbdbf5cbfe7b441c95.tar.bz2 |
re PR sanitizer/61095 (miscompile: tsan is broken in gcc trunk, works in 4.9)
gcc/testsuite/
PR tree-optimization/61095
* gcc.dg/torture/pr61095.c: New test.
From-SVN: r210203
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; +} |