aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2020-11-14 21:10:25 -0500
committerDavid Edelsohn <dje.gcc@gmail.com>2020-11-15 14:39:21 -0500
commit6403e02510fe84c72c515247a9dfdb6e05d977fe (patch)
tree1413f01fd8e0a23bc5b8fd56e7aac608d0546ded /gcc
parent8b3be949a563eb1ef23f777587b58f85cc7b9ef6 (diff)
downloadgcc-6403e02510fe84c72c515247a9dfdb6e05d977fe.zip
gcc-6403e02510fe84c72c515247a9dfdb6e05d977fe.tar.gz
gcc-6403e02510fe84c72c515247a9dfdb6e05d977fe.tar.bz2
testsuite: Update scanning symbol sections to support AIX.
gcc/testsuite: * lib/scanasm.exp (parse_section_of_symbols): Also look for AIX XCOFF CSECT notation. * g++.dg/opt/const4.C: Also look for AIX XCOFF "[RO]". * gcc.dg/20021029-1.c: Likewise. * gcc.dg/array-quals-1.c: Likewise and "[RW]". * g++.dg/gomp/tls-5.C: Also look for AIX XCOFF "[TL]". * gcc.dg/pr25376.c: Accept AIX decoration around named section and function descriptor.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-5.C4
-rw-r--r--gcc/testsuite/g++.dg/opt/const4.C2
-rw-r--r--gcc/testsuite/gcc.dg/20021029-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/array-quals-1.c40
-rw-r--r--gcc/testsuite/gcc.dg/pr25376.c2
-rw-r--r--gcc/testsuite/lib/scanasm.exp2
6 files changed, 26 insertions, 26 deletions
diff --git a/gcc/testsuite/g++.dg/gomp/tls-5.C b/gcc/testsuite/g++.dg/gomp/tls-5.C
index a1d3120..b18a127 100644
--- a/gcc/testsuite/g++.dg/gomp/tls-5.C
+++ b/gcc/testsuite/g++.dg/gomp/tls-5.C
@@ -1,8 +1,8 @@
// The reference temp should be TLS, not normal data.
// { dg-require-effective-target c++11 }
// { dg-final { scan-assembler-not "\\.data" { target tls_native xfail powerpc-*-aix* } } }
-// { dg-final { scan-assembler-symbol-section {^_?ir$} {^\.tbss} } }
-// { dg-final { scan-assembler-symbol-section {^_?_ZGR2ir_$} {^\.tdata} } }
+// { dg-final { scan-assembler-symbol-section {^_?ir$} {^\.tbss|\[TL\]} } }
+// { dg-final { scan-assembler-symbol-section {^_?_ZGR2ir_$} {^\.tdata|\[TL\]} } }
extern int&& ir;
#pragma omp threadprivate (ir)
diff --git a/gcc/testsuite/g++.dg/opt/const4.C b/gcc/testsuite/g++.dg/opt/const4.C
index 51d5313..75ee0e6 100644
--- a/gcc/testsuite/g++.dg/opt/const4.C
+++ b/gcc/testsuite/g++.dg/opt/const4.C
@@ -3,7 +3,7 @@
// that have it.
// { dg-do compile }
-// { dg-final { scan-assembler-symbol-section {constant_variable} {^\.(const|rodata)} } }
+// { dg-final { scan-assembler-symbol-section {constant_variable} {^\.(const|rodata)|\[RO\]} } }
const int constant_variable[] __attribute__ ((__used__)) = { 0, 1, 2, 3 };
// The MMIX port always switches to the .data section at the end of a file.
diff --git a/gcc/testsuite/gcc.dg/20021029-1.c b/gcc/testsuite/gcc.dg/20021029-1.c
index c8ae4aa..57c2b48 100644
--- a/gcc/testsuite/gcc.dg/20021029-1.c
+++ b/gcc/testsuite/gcc.dg/20021029-1.c
@@ -3,7 +3,7 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
/* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
-/* { dg-final { scan-assembler-symbol-section {ar} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {ar} {^\.(const|rodata)|\[RO\]} } } */
/* { dg-require-effective-target label_values } */
/* { dg-require-effective-target indirect_jumps } */
diff --git a/gcc/testsuite/gcc.dg/array-quals-1.c b/gcc/testsuite/gcc.dg/array-quals-1.c
index 819bd24..31aa1d3 100644
--- a/gcc/testsuite/gcc.dg/array-quals-1.c
+++ b/gcc/testsuite/gcc.dg/array-quals-1.c
@@ -6,46 +6,46 @@
/* { dg-options "-Wno-discarded-array-qualifiers" } */
/* The MMIX port always switches to the .data section at the end of a file. */
/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* } } } */
-/* { dg-final { scan-assembler-symbol-section {^_?a$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?a$} {^\.(const|rodata)|\[RO\]} } } */
static const int a[2] = { 1, 2 };
-/* { dg-final { scan-assembler-symbol-section {^_?a1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?a1$} {^\.(const|rodata)|\[RO\]} } } */
const int a1[2] = { 1, 2 };
typedef const int ci;
-/* { dg-final { scan-assembler-symbol-section {^_?b$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?b$} {^\.(const|rodata)|\[RO\]} } } */
static ci b[2] = { 3, 4 };
-/* { dg-final { scan-assembler-symbol-section {^_?b1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?b1$} {^\.(const|rodata)|\[RO\]} } } */
ci b1[2] = { 3, 4 };
typedef int ia[2];
-/* { dg-final { scan-assembler-symbol-section {^_?c$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?c$} {^\.(const|rodata)|\[RO\]} } } */
static const ia c = { 5, 6 };
-/* { dg-final { scan-assembler-symbol-section {^_?c1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?c1$} {^\.(const|rodata)|\[RO\]} } } */
const ia c1 = { 5, 6 };
typedef const int cia[2];
-/* { dg-final { scan-assembler-symbol-section {^_?d$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?d$} {^\.(const|rodata)|\[RO\]} } } */
static cia d = { 7, 8 };
-/* { dg-final { scan-assembler-symbol-section {^_?d1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?d1$} {^\.(const|rodata)|\[RO\]} } } */
cia d1 = { 7, 8 };
-/* { dg-final { scan-assembler-symbol-section {^_?e$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?e$} {^\.(const|rodata)|\[RO\]} } } */
static cia e[2] = { { 1, 2 }, { 3, 4 } };
-/* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?e1$} {^\.(const|rodata)|\[RO\]} } } */
cia e1[2] = { { 1, 2 }, { 3, 4 } };
-/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?p$} {^\.(const|rodata)|\[RW\]} } } */
void *const p = &a;
-/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?q$} {^\.(const|rodata)|\[RW\]} } } */
void *const q = &b;
-/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?r$} {^\.(const|rodata)|\[RW\]} } } */
void *const r = &c;
-/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?s$} {^\.(const|rodata)|\[RW\]} } } */
void *const s = &d;
-/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?t$} {^\.(const|rodata)|\[RW\]} } } */
void *const t = &e;
-/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?p1$} {^\.(const|rodata)|\[RW\]} } } */
void *const p1 = &a1;
-/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?q1$} {^\.(const|rodata)|\[RW\]} } } */
void *const q1 = &b1;
-/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?r1$} {^\.(const|rodata)|\[RW\]} } } */
void *const r1 = &c1;
-/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?s1$} {^\.(const|rodata)|\[RW\]} } } */
void *const s1 = &d1;
-/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata)} } } */
+/* { dg-final { scan-assembler-symbol-section {^_?t1$} {^\.(const|rodata)|\[RW\]} } } */
void *const t1 = &e1;
diff --git a/gcc/testsuite/gcc.dg/pr25376.c b/gcc/testsuite/gcc.dg/pr25376.c
index 25f1b66..accf323 100644
--- a/gcc/testsuite/gcc.dg/pr25376.c
+++ b/gcc/testsuite/gcc.dg/pr25376.c
@@ -7,4 +7,4 @@ void simple (void)
}
/* { dg-final { scan-assembler "my_named_section" } } */
-/* { dg-final { scan-assembler-symbol-section {simple$} {^my_named_section$} } } */
+/* { dg-final { scan-assembler-symbol-section {simple$} {^\.?my_named_section|simple\[DS\]} } } */
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 5fb1455..43b7649 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -303,7 +303,7 @@ proc dg-scan-symbol-section { name testcase output_file symbol_pattern expected_
proc parse_section_of_symbols { filename result } {
upvar $result up_result
- set section_pattern {^\s*(?:\.section\s+(.*)|(\.const|\.data|\.text)\s*)$}
+ set section_pattern {^\s*(?:(\.section|\.csect)\s+(.*)|(\.const|\.data|\.text)\s*)$}
set label_pattern {^(\S+):$}
set fd [open $filename r]