From: iains Date: Fri, 20 Sep 2019 18:52:05 +0000 (+0000) Subject: [Darwin, X86, testsuite] Fix naked-1.c fail. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38fe150212dbb6307a56fef104a0c9b8c14e4469;p=thirdparty%2Fgcc.git [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 * gcc.target/i386/naked-1.c: Alter options to use non- PIC codegen for m32 Darwin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276004 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f46b109e8eb9..05c25ee28ce2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-09-20 Iain Sandoe + + * gcc.target/i386/naked-1.c: Alter options to use non- + PIC codegen for m32 Darwin. + 2019-09-20 Tobias Burnus PR fortran/78260 diff --git a/gcc/testsuite/gcc.target/i386/naked-1.c b/gcc/testsuite/gcc.target/i386/naked-1.c index 07bb10edd8f3..f51773c46ac4 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. */