From 839e636a9abe65f4880fb5d9609f8ee5ff277fe5 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Fri, 22 Nov 2019 20:58:54 +0000 Subject: [PATCH] [Darwin, X86, testsuite] Update tests for common section use. The tests amended here now have different code-gen with default options because, previously, the access were indirected per Darwin ABI for common accesses. The revised code-gen does not match the expected scan-asms because Darwin defaults to fPIC. For these tests, it seems that the best solution is to use '-mdynamic-no-pic' in the m32 case which makes the output similar to the ElF platform default. gcc/testsuite/ChangeLog: 2019-11-22 Iain Sandoe * gcc.target/i386/pr27971.c: Use mdynamic-no-pic for m32 on Darwin. * gcc.target/i386/sse2-load-multi.c: Likewise. * gcc.target/i386/sse2-store-multi.c: Likewise. From-SVN: r278631 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/i386/pr27971.c | 2 ++ gcc/testsuite/gcc.target/i386/sse2-load-multi.c | 1 + gcc/testsuite/gcc.target/i386/sse2-store-multi.c | 1 + 4 files changed, 11 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9d2497ae77..1f61bc3e72f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-11-22 Iain Sandoe + + * gcc.target/i386/pr27971.c: Use mdynamic-no-pic for m32 on + Darwin. + * gcc.target/i386/sse2-load-multi.c: Likewise. + * gcc.target/i386/sse2-store-multi.c: Likewise. + 2019-11-22 Jakub Jelinek Implement P1920R1, Missing feature-test macros 2017-2019. diff --git a/gcc/testsuite/gcc.target/i386/pr27971.c b/gcc/testsuite/gcc.target/i386/pr27971.c index 149bf2b8e55..f80cb6502fd 100644 --- a/gcc/testsuite/gcc.target/i386/pr27971.c +++ b/gcc/testsuite/gcc.target/i386/pr27971.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mno-tbm" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */ unsigned array[4]; @@ -16,3 +17,4 @@ unsigned foo(TYPE x) /* { dg-final { scan-assembler-not "shr\[^\\n\]*2" } } */ /* { dg-final { scan-assembler "and\[^\\n\]*12" } } */ + \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/i386/sse2-load-multi.c b/gcc/testsuite/gcc.target/i386/sse2-load-multi.c index 927605460d8..3ee0ef83d63 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-load-multi.c +++ b/gcc/testsuite/gcc.target/i386/sse2-load-multi.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=corei7 -O2" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse2-store-multi.c b/gcc/testsuite/gcc.target/i386/sse2-store-multi.c index 203a00f69be..ca0493492e1 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-store-multi.c +++ b/gcc/testsuite/gcc.target/i386/sse2-store-multi.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=corei7 -O2" } */ +/* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */ #include -- 2.30.2