From b5afeda1edd22be941bbf8bc6902feed4af2ccdf Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 27 Jul 2015 16:24:35 +0000 Subject: 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 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/pr66232-6.c | 13 +++++++++++++ gcc/testsuite/gcc.target/i386/pr66232-7.c | 14 ++++++++++++++ gcc/testsuite/gcc.target/i386/pr66232-8.c | 13 +++++++++++++ gcc/testsuite/gcc.target/i386/pr66232-9.c | 13 +++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr66232-6.c create mode 100644 gcc/testsuite/gcc.target/i386/pr66232-7.c create mode 100644 gcc/testsuite/gcc.target/i386/pr66232-8.c create mode 100644 gcc/testsuite/gcc.target/i386/pr66232-9.c 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 + + 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 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 } } } */ -- cgit v1.1