summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-15 22:31:47 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-15 22:31:47 +0000
commit9a56024d74d1ad3977ee5b657249d8ae07462b94 (patch)
treec16d1988a30f0cf7d0b8af94b59218433855d7eb
parent7ecb2e7c14c168c0b6701492a559d8ff36012f0b (diff)
downloadgcc-9a56024d74d1ad3977ee5b657249d8ae07462b94.tar.gz
PR tree-optimization/46491
* gcc.target/i386/pr46491.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166777 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46491.c22
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index aeaf08b5d0a..82413bdecd4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2010-11-15 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/46491
+ * gcc.target/i386/pr46491.c: New test.
+
PR tree-optimization/46461
* gcc.c-torture/compile/pr46461.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr46491.c b/gcc/testsuite/gcc.target/i386/pr46491.c
new file mode 100644
index 00000000000..82f704c266f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr46491.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/46491 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+__attribute__((noinline)) int
+foo (int *p)
+{
+ int r;
+ asm ("movl $6, (%1)\n\txorl %0, %0" : "=r" (r) : "r" (p) : "memory");
+ return r;
+}
+
+int
+main (void)
+{
+ int p = 8;
+ if ((foo (&p) ? : p) != 6)
+ abort ();
+ return 0;
+}