OSDN Git Service

Add the testcase for PR 52146
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Feb 2012 20:03:08 +0000 (20:03 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Feb 2012 20:03:08 +0000 (20:03 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184113 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gcc.target/i386/pr52146.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.target/i386/pr52146.c b/gcc/testsuite/gcc.target/i386/pr52146.c
new file mode 100644 (file)
index 0000000..a4804e6
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32" } */
+
+void
+test1 (void)
+{
+  int* apic_tpr_addr = (int *) 0xfee00080;
+  *apic_tpr_addr += 4;
+}
+
+void
+test2 (void)
+{
+  int* apic_tpr_addr = (int *) 0xfee00080;
+  *apic_tpr_addr = 0;
+}
+
+/* { dg-final { scan-assembler-not "-18874240" } } */