summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-24 09:13:09 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-24 09:13:09 +0000
commitb9b50b55407c2148550647b7d0eafc24826f9988 (patch)
tree53c53bb47a681d284ef94aace31097589baaa6a4 /gcc/testsuite
parent8e9955ee170ced21e95ad4652db8a4c96f52cbf4 (diff)
downloadgcc-b9b50b55407c2148550647b7d0eafc24826f9988.tar.gz
PR rtl-optimization/55010
* cse.c (fold_rtx) <RTX_COMPARE>: Call copy_rtx on folded_arg{0,1} before passing it to simplify_relational_operation. * gcc.dg/pr55010.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/pr55010.c13
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0648f1e69cb..8027bf4abcf 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2012-10-24 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/55010
+ * gcc.dg/pr55010.c: New test.
+
PR debug/54828
* g++.dg/debug/pr54828.C: New test.
diff --git a/gcc/testsuite/gcc.dg/pr55010.c b/gcc/testsuite/gcc.dg/pr55010.c
new file mode 100644
index 00000000000..a3dc41d8d01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55010.c
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/55010 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+
+long long int a;
+unsigned long long int b;
+
+void
+foo (void)
+{
+ a = (a < 0) / ((a -= b) ? b >= ((b = a) || 0) : 0);
+}