aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52146.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr52146.c b/gcc/testsuite/gcc.target/i386/pr52146.c
new file mode 100644
index 0000000..a4804e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52146.c
@@ -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" } } */