This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed, PATCH]: Add more tests for PR target/66232


Index: ChangeLog
===================================================================
--- ChangeLog	(revision 226252)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* 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
Index: gcc.target/i386/pr66232-6.c
===================================================================
--- gcc.target/i386/pr66232-6.c	(revision 0)
+++ gcc.target/i386/pr66232-6.c	(working copy)
@@ -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 } } } */
Index: gcc.target/i386/pr66232-7.c
===================================================================
--- gcc.target/i386/pr66232-7.c	(revision 0)
+++ gcc.target/i386/pr66232-7.c	(working copy)
@@ -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 } } } */
Index: gcc.target/i386/pr66232-8.c
===================================================================
--- gcc.target/i386/pr66232-8.c	(revision 0)
+++ gcc.target/i386/pr66232-8.c	(working copy)
@@ -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 } } } */
Index: gcc.target/i386/pr66232-9.c
===================================================================
--- gcc.target/i386/pr66232-9.c	(revision 0)
+++ gcc.target/i386/pr66232-9.c	(working copy)
@@ -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 } } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]