aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-03 08:59:21 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-03 08:59:21 +0000
commit8b3c295192e3886940be529ebd380b093d77fdef (patch)
treecce39e915f0c8795b8736c761af35b64f69fe9a8 /gcc/testsuite/gcc.dg
parent96fda42cb42f8aa502b306f2626227d5d2615919 (diff)
downloadgcc-8b3c295192e3886940be529ebd380b093d77fdef.zip
gcc-8b3c295192e3886940be529ebd380b093d77fdef.tar.gz
gcc-8b3c295192e3886940be529ebd380b093d77fdef.tar.bz2
re PR c/51730 (autoconf 2.60 through 2.67 stdbool.h check fails with GCC 4.7)
2012-01-03 Richard Guenther <rguenther@suse.de> PR middle-end/51730 * fold-const.c (fold_comparison): Properly canonicalize tree offset and HOST_WIDE_INT bit position. * gcc.dg/fold-compare-6.c: New testcase. From-SVN: r182830
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/fold-compare-6.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/fold-compare-6.c b/gcc/testsuite/gcc.dg/fold-compare-6.c
new file mode 100644
index 0000000..7ddf6b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-compare-6.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+char digs[] = "0123456789";
+int foo (void)
+{
+ int xlcbug = 1 / (&(digs + 5)[-2 + (_Bool) 1] == &digs[4] ? 1 : -1);
+ return xlcbug;
+}
+
+/* { dg-final { scan-tree-dump "xlcbug = 1;" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */