From: H.J. Lu Date: Fri, 24 Jun 2016 11:17:14 +0000 (+0000) Subject: Enable non-PIC noplt tests on 32-bit x86 target X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfee28703668e4aa85de36e4f4bd0cac7a04146d;p=gcc.git Enable non-PIC noplt tests on 32-bit x86 target Since non-PIC noplt works on 32-bit x86 target now with assembler/linker support, enable non-PIC noplt tests on 32-bit x86 target. main in noplt-2.c and noplt-4.c are renamed to bar to avoid stack re-alignment in main for 32-bit target, which disables tailcall optimization. * gcc.target/i386/noplt-1.c: Don't disable for ia32. Scan for ia32 if R_386_GOT32X relocation is supported. * gcc.target/i386/noplt-3.c: Likewise. * gcc.target/i386/noplt-2.c: Likewise. (main): Renamed to ... (bar): This. * gcc.target/i386/noplt-4.c: Likewise. (main): Renamed to ... (bar): This. * gcc.target/i386/pr67400-3.c: Don't disable for ia32. * gcc.target/i386/pr67400-5.c: Likewise. From-SVN: r237756 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 589657bf2e9..e13be243ba8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2016-06-24 H.J. Lu + + * gcc.target/i386/noplt-1.c: Don't disable for ia32. Scan for + ia32 if R_386_GOT32X relocation is supported. + * gcc.target/i386/noplt-3.c: Likewise. + * gcc.target/i386/noplt-2.c: Likewise. + (main): Renamed to ... + (bar): This. + * gcc.target/i386/noplt-4.c: Likewise. + (main): Renamed to ... + (bar): This. + * gcc.target/i386/pr67400-3.c: Don't disable for ia32. + * gcc.target/i386/pr67400-5.c: Likewise. + 2016-06-24 Jakub Jelinek * c-c++-common/torture/builtin-arith-overflow-p-19.c: Run for C++ too. diff --git a/gcc/testsuite/gcc.target/i386/noplt-1.c b/gcc/testsuite/gcc.target/i386/noplt-1.c index cc04bf52def..f099a3828cd 100644 --- a/gcc/testsuite/gcc.target/i386/noplt-1.c +++ b/gcc/testsuite/gcc.target/i386/noplt-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-fno-pic" } */ __attribute__ ((noplt)) @@ -10,4 +10,5 @@ int main() return 0; } -/* { dg-final { scan-assembler "call\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ +/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/noplt-2.c b/gcc/testsuite/gcc.target/i386/noplt-2.c index 54e33f4bd42..9548b81cf01 100644 --- a/gcc/testsuite/gcc.target/i386/noplt-2.c +++ b/gcc/testsuite/gcc.target/i386/noplt-2.c @@ -1,13 +1,14 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-O2 -fno-pic" } */ __attribute__ ((noplt)) int foo(); -int main() +int bar() { return foo(); } -/* { dg-final { scan-assembler "jmp\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/noplt-3.c b/gcc/testsuite/gcc.target/i386/noplt-3.c index 14e6b6be858..436c0d10216 100644 --- a/gcc/testsuite/gcc.target/i386/noplt-3.c +++ b/gcc/testsuite/gcc.target/i386/noplt-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-fno-pic -fno-plt" } */ void foo(); @@ -9,4 +9,5 @@ int main() return 0; } -/* { dg-final { scan-assembler "call\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ +/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/noplt-4.c b/gcc/testsuite/gcc.target/i386/noplt-4.c index 990734741bb..b89fcf04a3c 100644 --- a/gcc/testsuite/gcc.target/i386/noplt-4.c +++ b/gcc/testsuite/gcc.target/i386/noplt-4.c @@ -1,11 +1,12 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-O2 -fno-pic -fno-plt" } */ int foo(); -int main() +int bar() { return foo(); } -/* { dg-final { scan-assembler "jmp\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr67400-3.c b/gcc/testsuite/gcc.target/i386/pr67400-3.c index 649c9809708..fd2f209696e 100644 --- a/gcc/testsuite/gcc.target/i386/pr67400-3.c +++ b/gcc/testsuite/gcc.target/i386/pr67400-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-O2 -fno-pic -fno-plt" } */ static void diff --git a/gcc/testsuite/gcc.target/i386/pr67400-5.c b/gcc/testsuite/gcc.target/i386/pr67400-5.c index 2d26a686d3a..9bb98dcd26f 100644 --- a/gcc/testsuite/gcc.target/i386/pr67400-5.c +++ b/gcc/testsuite/gcc.target/i386/pr67400-5.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-do compile { target *-*-linux* } } */ /* { dg-options "-O2 -fno-pic -fno-plt" } */ extern void foo (void);