[gcc r17-3374] [PATCH 5/7] testsuite: disable small data for attr-retain tests on alpha
Jeff Law via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:cd1ace7fd8e9c6fd4ebc475c52d5c04bb9f2bee3 commit r17-3374-gcd1ace7fd8e9c6fd4ebc475c52d5c04bb9f2bee3 Author: Matt Turner <[email protected]> Date: Tue Aug 18 08:39:33 2026 -0600 [PATCH 5/7] testsuite: disable small data for attr-retain tests on alpha The attr-retain tests scan for the R section flag on .text, .data, .bss and .rodata. Alpha places small objects in the gp-relative small data area instead, emitting .sdata/.sbss with an additional "s" flag, so scans such as .rodata.*,"aR" do not match even though the retain flag itself is emitted correctly. The tests already compile with -G0 on powerpc ilp32 for this reason. Do the same on alpha, which fixes 57 failures across the C and C++ testsuites. gcc/testsuite/ChangeLog: * c-c++-common/attr-retain-2.c: Also pass -G0 on alpha. * c-c++-common/attr-retain-3.c: Likewise. * c-c++-common/attr-retain-4.c: Likewise. * gcc.c-torture/compile/attr-retain-1.c: Likewise. * gcc.c-torture/compile/attr-retain-2.c: Likewise. Diff: --- gcc/testsuite/c-c++-common/attr-retain-2.c | 3 +++ gcc/testsuite/c-c++-common/attr-retain-3.c | 3 +++ gcc/testsuite/c-c++-common/attr-retain-4.c | 3 +++ gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c | 3 +++ gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c | 3 +++ 5 files changed, 15 insertions(+) diff --git a/gcc/testsuite/c-c++-common/attr-retain-2.c b/gcc/testsuite/c-c++-common/attr-retain-2.c index 1fe721ea364d..f77f9fed05b0 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-2.c +++ b/gcc/testsuite/c-c++-common/attr-retain-2.c @@ -1,5 +1,8 @@ /* { dg-do compile { target gnu_retain } } */ /* { dg-options "-Wall -O2" } */ +/* Alpha places small objects in gp-relative sdata/sbss, which carry an + extra "s" section flag the scans do not match. */ +/* { dg-additional-options "-G0" { target alpha*-*-* } } */ static int xyzzy __attribute__((__used__, __retain__)) = 1; diff --git a/gcc/testsuite/c-c++-common/attr-retain-3.c b/gcc/testsuite/c-c++-common/attr-retain-3.c index 383403987c61..f5724f1ecfbb 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-3.c +++ b/gcc/testsuite/c-c++-common/attr-retain-3.c @@ -1,5 +1,8 @@ /* { dg-do compile { target gnu_retain } } */ /* { dg-options "-Wall -O2 -fcommon" } */ +/* Alpha places small objects in gp-relative sdata/sbss, which carry an + extra "s" section flag the scans do not match. */ +/* { dg-additional-options "-G0" { target alpha*-*-* } } */ static int xyzzy __attribute__((__used__, __retain__)); diff --git a/gcc/testsuite/c-c++-common/attr-retain-4.c b/gcc/testsuite/c-c++-common/attr-retain-4.c index bf5899e0ac4f..3f0c7d52d193 100644 --- a/gcc/testsuite/c-c++-common/attr-retain-4.c +++ b/gcc/testsuite/c-c++-common/attr-retain-4.c @@ -1,5 +1,8 @@ /* { dg-do compile { target gnu_retain } } */ /* { dg-options "-Wall -O2 -fcommon" } */ +/* Alpha places small objects in gp-relative sdata/sbss, which carry an + extra "s" section flag the scans do not match. */ +/* { dg-additional-options "-G0" { target alpha*-*-* } } */ int xyzzy __attribute__((__used__, __retain__)); diff --git a/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c b/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c index 963c7860dfaa..e10acfa57bb2 100644 --- a/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c @@ -1,6 +1,9 @@ /* { dg-do compile { target gnu_retain } } */ /* Prevent readonly data from being put in writable sdata for 32-bit powerpc. */ /* { dg-options "-G0" { target { powerpc*-*-* && ilp32 } } } */ +/* Alpha places small objects in gp-relative sdata/sbss, which carry an + extra "s" section flag the scans do not match. */ +/* { dg-additional-options "-G0" { target alpha*-*-* } } */ /* { dg-final { scan-assembler ".text.*,\"axR\"" } } */ /* { dg-final { scan-assembler ".bss.*,\"awR\"" } } */ /* { dg-final { scan-assembler ".data.*,\"awR\"" } } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c b/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c index 5ae043411d95..dd5ed90d7ff9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c @@ -13,5 +13,8 @@ /* { dg-options "-ffunction-sections -fdata-sections" } */ /* Prevent readonly data from being put in writable sdata for 32-bit powerpc. */ /* { dg-options "-ffunction-sections -fdata-sections -G0" { target { powerpc*-*-* && ilp32 } } } */ +/* Alpha places small objects in gp-relative sdata/sbss, which carry an + extra "s" section flag the scans do not match. */ +/* { dg-additional-options "-G0" { target alpha*-*-* } } */ #include "attr-retain-1.c"