From: H.J. Lu Date: Fri, 10 Feb 2012 20:03:08 +0000 (-0800) Subject: Add the testcase for PR 52146 X-Git-Tag: releases/gcc-4.7.0~462 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3b0c721e8e6f236f0609f2b753381369d0a0119;p=thirdparty%2Fgcc.git Add the testcase for PR 52146 From-SVN: r184113 --- 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" } } */