From: H.J. Lu Date: Mon, 27 Jul 2015 16:24:35 +0000 (+0000) Subject: Add more tests for PR target/66232 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5afeda1edd22be941bbf8bc6902feed4af2ccdf;p=gcc.git Add more tests for PR target/66232 PR target/66232 * gcc.target/i386/pr66232-6.c: New tests. * gcc.target/i386/pr66232-7.c: Likewise. * gcc.target/i386/pr66232-8.c: Likewise. * gcc.target/i386/pr66232-9.c: Likewise. From-SVN: r226254 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8b572c28fee..3e409dda43b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2015-07-27 H.J. Lu + + PR target/66232 + * gcc.target/i386/pr66232-6.c: New tests. + * gcc.target/i386/pr66232-7.c: Likewise. + * gcc.target/i386/pr66232-8.c: Likewise. + * gcc.target/i386/pr66232-9.c: Likewise. + 2015-07-27 Marek Polacek PR c++/66555 diff --git a/gcc/testsuite/gcc.target/i386/pr66232-6.c b/gcc/testsuite/gcc.target/i386/pr66232-6.c new file mode 100644 index 00000000000..e95c7899c30 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66232-6.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fno-pic -fno-plt" } */ + +extern void bar (void) __attribute__((visibility("hidden"))); + +void +foo (void) +{ + bar (); +} + +/* { dg-final { scan-assembler-not "jmp\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "jmp\[ \t\]*.bar@GOT" { target ia32 } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr66232-7.c b/gcc/testsuite/gcc.target/i386/pr66232-7.c new file mode 100644 index 00000000000..63a180955fb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66232-7.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fno-pic -fno-plt" } */ + +extern void bar (void) __attribute__((visibility("hidden"))); + +int +foo (void) +{ + bar (); + return 0; +} + +/* { dg-final { scan-assembler-not "call\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "call\[ \t\]*.bar@GOT" { target ia32 } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr66232-8.c b/gcc/testsuite/gcc.target/i386/pr66232-8.c new file mode 100644 index 00000000000..89bb60501ea --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66232-8.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fno-pic -fno-plt" } */ + +extern int bar (void) __attribute__((visibility("hidden"))); + +int +foo (void) +{ + return bar (); +} + +/* { dg-final { scan-assembler-not "jmp\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "jmp\[ \t\]*.bar@GOT" { target ia32 } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr66232-9.c b/gcc/testsuite/gcc.target/i386/pr66232-9.c new file mode 100644 index 00000000000..4aec47795b9 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66232-9.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -fno-pic -fno-plt" } */ + +extern int bar (void) __attribute__((visibility("hidden"))); + +int +foo (void) +{ + return bar () + 1; +} + +/* { dg-final { scan-assembler-not "call\[ \t\]*.bar@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "call\[ \t\]*.bar@GOT" { target ia32 } } } */