https://gcc.gnu.org/g:b30410a1083cba065a197df7d18db3a8a0a01997

commit r17-3963-gb30410a1083cba065a197df7d18db3a8a0a01997
Author: Iain Sandoe <[email protected]>
Date:   Sat Sep 5 16:45:32 2026 +0100

    testsuite, Darwin: Add '-mdynamic-no-pic' to more x86 tests.
    
    Many tests asume default ELF non-pic code, where Darwin defaults to
    PIC - for 32b cases we can, however, use -mdynamic-no-pic to approximate
    the ELF behaviour - usually sufficient to demonstrate the test purpose.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/i386/pr36502.c: Add -mdynamic-no-pic for Darwin.
            * gcc.target/i386/pr85667-6.c: Likewise.
    
    Signed-off-by: Iain Sandoe <[email protected]>

Diff:
---
 gcc/testsuite/gcc.target/i386/pr36502.c   | 2 +-
 gcc/testsuite/gcc.target/i386/pr85667-6.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr36502.c 
b/gcc/testsuite/gcc.target/i386/pr36502.c
index bc4c7ccf1c8e..f745dfc38600 100644
--- a/gcc/testsuite/gcc.target/i386/pr36502.c
+++ b/gcc/testsuite/gcc.target/i386/pr36502.c
@@ -1,6 +1,6 @@
 /* PR target/36502 */
 /* { dg-do compile { target { *-*-darwin* && ilp32 } } } */
-/* { dg-options "-O -fomit-frame-pointer -fno-pic" } */
+/* { dg-options "-O -fomit-frame-pointer -mdynamic-no-pic" } */
 int a;
 void f() {a++;}
 /* { dg-final { scan-assembler-not "esp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr85667-6.c 
b/gcc/testsuite/gcc.target/i386/pr85667-6.c
index 06570dd64608..c1058d6ba75b 100644
--- a/gcc/testsuite/gcc.target/i386/pr85667-6.c
+++ b/gcc/testsuite/gcc.target/i386/pr85667-6.c
@@ -1,6 +1,7 @@
 /* { dg-do compile { target ia32 } } */
 /* { dg-options "-O2" } */
 /* { dg-additional-options "-fno-PIE" { target ia32 } } */
+/* { dg-additional-options "-mdynamic-no-pic" { target *-*-darwin* } } */
 /* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax" 1 } } */
 /* { dg-final { scan-assembler-times "flds\[^\n\r]*" 1 } } */
 typedef struct

Reply via email to