These tests set large code model with -mcmodel=large or target pragma for AArch64. But if GCC is configured with --enable-default-pie, it triggers "sorry: unimplemented: code model large with -fpic". Disable PIE to make avoid the issue.
gcc/testsuite/ChangeLog: PR testsuite/70150 * gcc.dg/tls/pr78796.c (dg-additional-options): Add -fno-pie -no-pie for aarch64-*-*. * gcc.target/aarch64/pr63304_1.c (dg-options): Add -fno-pie. * gcc.target/aarch64/pr70120-2.c (dg-options): Add -fno-pie. * gcc.target/aarch64/pr78733.c (dg-options): Add -fno-pie. * gcc.target/aarch64/pr79041-2.c (dg-options): Add -fno-pie. * gcc.target/aarch64/pr94530.c (dg-options): Add -fno-pie. * gcc.target/aarch64/pr94577.c (dg-options): Add -fno-pie. * gcc.target/aarch64/reload-valid-spoff.c (dg-options): Add -fno-pie. --- gcc/testsuite/gcc.dg/tls/pr78796.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr63304_1.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr70120-2.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr78733.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr79041-2.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr94530.c | 2 +- gcc/testsuite/gcc.target/aarch64/pr94577.c | 2 +- gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.dg/tls/pr78796.c b/gcc/testsuite/gcc.dg/tls/pr78796.c index 038e5366e41..96f87d47ba4 100644 --- a/gcc/testsuite/gcc.dg/tls/pr78796.c +++ b/gcc/testsuite/gcc.dg/tls/pr78796.c @@ -1,7 +1,7 @@ /* PR target/78796 */ /* { dg-do run } */ /* { dg-options "-O2" } */ -/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */ +/* { dg-additional-options "-mcmodel=large -fno-pie -no-pie" { target aarch64-*-* } } */ /* { dg-require-effective-target tls_runtime } */ /* { dg-add-options tls } */ diff --git a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c index 9f1ed947806..5d519d817cc 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr63304_1.c +++ b/gcc/testsuite/gcc.target/aarch64/pr63304_1.c @@ -1,6 +1,6 @@ /* { dg-do assemble } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-O1 --save-temps" } */ +/* { dg-options "-O1 --save-temps -fno-pie" } */ #pragma GCC push_options #pragma GCC target ("+nothing+simd,cmodel=small") diff --git a/gcc/testsuite/gcc.target/aarch64/pr70120-2.c b/gcc/testsuite/gcc.target/aarch64/pr70120-2.c index 663bf2ed147..8f5cdc93fe3 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr70120-2.c +++ b/gcc/testsuite/gcc.target/aarch64/pr70120-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-Og -freorder-functions -g3 -mcmodel=large" } */ +/* { dg-options "-Og -freorder-functions -g3 -mcmodel=large -fno-pie" } */ typedef short v32u16 __attribute__ ((vector_size (32))); typedef int v32u32 __attribute__ ((vector_size (32))); diff --git a/gcc/testsuite/gcc.target/aarch64/pr78733.c b/gcc/testsuite/gcc.target/aarch64/pr78733.c index 4695b5c1b2b..8556ef3f371 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr78733.c +++ b/gcc/testsuite/gcc.target/aarch64/pr78733.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads" } */ +/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads -fno-pie" } */ /* { dg-require-effective-target lp64 } */ /* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-fpic" } { "" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/pr79041-2.c b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c index 4695b5c1b2b..8556ef3f371 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr79041-2.c +++ b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads" } */ +/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads -fno-pie" } */ /* { dg-require-effective-target lp64 } */ /* { dg-skip-if "-mcmodel=large, no support for -fpic" { aarch64-*-* } { "-fpic" } { "" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/pr94530.c b/gcc/testsuite/gcc.target/aarch64/pr94530.c index 2797d116dcf..5dfdbe3311d 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr94530.c +++ b/gcc/testsuite/gcc.target/aarch64/pr94530.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large" } */ +/* { dg-options "-Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large -fno-pie" } */ extern void bar(const char *); diff --git a/gcc/testsuite/gcc.target/aarch64/pr94577.c b/gcc/testsuite/gcc.target/aarch64/pr94577.c index 6f2d3612c26..d51799fb0bb 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr94577.c +++ b/gcc/testsuite/gcc.target/aarch64/pr94577.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mcmodel=large -mabi=ilp32" } */ +/* { dg-options "-mcmodel=large -mabi=ilp32 -fno-pie" } */ void foo () diff --git a/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c index 7b1982abb61..37e00ac9aa1 100644 --- a/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c +++ b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-O2 -mcmodel=large -fno-builtin" } */ +/* { dg-options "-O2 -mcmodel=large -fno-builtin -fno-pie" } */ /* { dg-skip-if "-mcmodel=large -fPIC not currently supported" { aarch64-*-* } { "-fPIC" } { "" } } */ typedef long unsigned int size_t; -- 2.39.2