diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2015-07-27 16:24:35 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2015-07-27 09:24:35 -0700 |
commit | b5afeda1edd22be941bbf8bc6902feed4af2ccdf (patch) | |
tree | 2d3b7c5e5c7d5dcc88ecb95120c9b51d93d15af4 | |
parent | ad7b853a10903ecbf8ed945b855422a924181456 (diff) | |
download | gcc-b5afeda1edd22be941bbf8bc6902feed4af2ccdf.zip gcc-b5afeda1edd22be941bbf8bc6902feed4af2ccdf.tar.gz gcc-b5afeda1edd22be941bbf8bc6902feed4af2ccdf.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr66232-6.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr66232-7.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr66232-8.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr66232-9.c | 13 |
5 files changed, 61 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8b572c2..3e409dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2015-07-27 H.J. Lu <hongjiu.lu@intel.com> + + 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 <polacek@redhat.com> 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 0000000..e95c789 --- /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 0000000..63a1809 --- /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 0000000..89bb605 --- /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 0000000..4aec477 --- /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 } } } */ |