From c3b0c721e8e6f236f0609f2b753381369d0a0119 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 10 Feb 2012 12:03:08 -0800 Subject: [PATCH] Add the testcase for PR 52146 From-SVN: r184113 --- gcc/testsuite/gcc.target/i386/pr52146.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr52146.c diff --git a/gcc/testsuite/gcc.target/i386/pr52146.c b/gcc/testsuite/gcc.target/i386/pr52146.c new file mode 100644 index 000000000000..a4804e67797d --- /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" } } */ -- 2.47.2