This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
array-quals-1.c test tweak
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: jsm at polyomino dot org dot uk
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Jan 2004 00:50:31 +1030
- Subject: array-quals-1.c test tweak
Hi Joseph,
Your new test is failing on powerpc64-linux, because a peculiarity of
the ABI requires that we select sections as if we're building for a
shared library. See config/rs6000/rs6000.c:rs6000_elf_select_section.
This results in all the initialized pointers being placed in
.data.rel.ro and .data.rel.ro.local. May I suggest the following
change to the test?
* gcc.dg/array-quals-1.c: Accept .data.rel.ro.
Index: gcc/testsuite/gcc.dg/array-quals-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/array-quals-1.c,v
retrieving revision 1.1
diff -u -p -r1.1 array-quals-1.c
--- gcc/testsuite/gcc.dg/array-quals-1.c 7 Jan 2004 19:40:03 -0000 1.1
+++ gcc/testsuite/gcc.dg/array-quals-1.c 8 Jan 2004 14:17:46 -0000
@@ -3,7 +3,7 @@
all should end up in a read-only section. PR c/12165. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-final { scan-assembler-not "\\.data" } } */
+/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" } } */
static const int a[2] = { 1, 2 };
const int a1[2] = { 1, 2 };
typedef const int ci;
--
Alan Modra
IBM OzLabs - Linux Technology Centre