aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPat Haugen <pthaugen@linux.ibm.com>2022-02-24 15:33:42 -0600
committerPat Haugen <pthaugen@linux.ibm.com>2022-02-24 15:33:42 -0600
commitae3c4e521dd0b66db712639298cd08331d62f315 (patch)
tree042be6a6e2f0b953adc039be5abcd38c120faace /gcc
parent916b809fbfdd2740006270baf549bf22fe9ec3c4 (diff)
downloadgcc-ae3c4e521dd0b66db712639298cd08331d62f315.zip
gcc-ae3c4e521dd0b66db712639298cd08331d62f315.tar.gz
gcc-ae3c4e521dd0b66db712639298cd08331d62f315.tar.bz2
Fix attr-retain-* tescases for 32-bit PowerPC.
PR testsuite/100407 gcc/testsuite/ * gcc.c-torture/compile/attr-retain-1.c: Add -G0 for 32-bit PowerPC. * gcc.c-torture/compile/attr-retain-2.c: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c2
2 files changed, 4 insertions, 0 deletions
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 6cab155..84f489a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/attr-retain-1.c
@@ -1,4 +1,6 @@
/* { dg-do compile { target R_flag_in_section } } */
+/* Prevent readonly data from being put in writable sdata for 32-bit powerpc. */
+/* { dg-options "-G0" { target { powerpc*-*-* && ilp32 } } } */
/* { 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 0208ffe..692e07b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/attr-retain-2.c
@@ -11,5 +11,7 @@
/* { dg-final { scan-assembler ".bss.used_lcomm2,\"awR\"" { target arm-*-* } } } */
/* { dg-final { scan-assembler ".data.used_foo_sec,\"awR\"" } } */
/* { 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 } } } */
#include "attr-retain-1.c"