This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Darwin, X86, testsuite, committed] Fix naked-1.c fail.
- From: Iain Sandoe <iain at sandoe dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Fri, 20 Sep 2019 20:02:05 +0100
- Subject: [Darwin, X86, testsuite, committed] 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.
tested on x86_64-darwin16, x86_64-pc-linux-gnu (m32/m64)
applied to mainline
thanks
Iain
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.
diff --git a/gcc/testsuite/gcc.target/i386/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c
index 07bb10edd8..f51773c46a 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. */