aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-09-20 18:52:05 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-09-20 18:52:05 +0000
commit1fa153b0ef29796df55dd64ff45f622840a13301 (patch)
treeac096b22c3d302d00c5372cd7fcceccb542e48d9
parentac4a783640162ed734c538ce1ff516b40431834b (diff)
downloadgcc-1fa153b0ef29796df55dd64ff45f622840a13301.zip
gcc-1fa153b0ef29796df55dd64ff45f622840a13301.tar.gz
gcc-1fa153b0ef29796df55dd64ff45f622840a13301.tar.bz2
[Darwin, X86, testsuite] Fix naked-1.c fail.
This fails at m32 because the scan-asm is looking for an absence of "ret". Darwin is generating the correct code for the function but the picbase thunk has a 'ret' insn. Fixed by making the test use -mdynamic-no-pic for m32. gcc/testsuite/ChangeLog: 2019-09-20 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/i386/naked-1.c: Alter options to use non- PIC codegen for m32 Darwin. From-SVN: r276004
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/naked-1.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f46b109..05c25ee2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-20 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.target/i386/naked-1.c: Alter options to use non-
+ PIC codegen for m32 Darwin.
+
2019-09-20 Tobias Burnus <tobias@codesourcery.com>
PR fortran/78260
diff --git a/gcc/testsuite/gcc.target/i386/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c
index 07bb10e..f51773c 100644
--- a/gcc/testsuite/gcc.target/i386/naked-1.c
+++ b/gcc/testsuite/gcc.target/i386/naked-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -fno-pic" } */
+/* { dg-options "-O0" } */
+/* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
+/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */
/* Verify that __attribute__((naked)) produces a naked function
that does not use ret to return but traps at the end. */