]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Update scanning symbol sections to support AIX.
authorDavid Edelsohn <dje.gcc@gmail.com>
Sun, 15 Nov 2020 02:10:25 +0000 (21:10 -0500)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sun, 15 Nov 2020 19:39:21 +0000 (14:39 -0500)
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.

gcc/testsuite/g++.dg/gomp/tls-5.C
gcc/testsuite/g++.dg/opt/const4.C
gcc/testsuite/gcc.dg/20021029-1.c
gcc/testsuite/gcc.dg/array-quals-1.c
gcc/testsuite/gcc.dg/pr25376.c
gcc/testsuite/lib/scanasm.exp

index a1d3120fbfb1cfcb668bc01b24b870fb05e5dd40..b18a1277edcb580d1045bea0de9ed5f1e0306b04 100644 (file)
@@ -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)
index 51d5313a312b536621bc5a896ae4c650cb75aa5f..75ee0e6ba8455f32106a16609d5fcb589ceed688 100644 (file)
@@ -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.
index c8ae4aa60e2ab292354fea3973d85997b502777d..57c2b48f13c4fbaa75d6669326f477bcd4cd6c96 100644 (file)
@@ -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 } */
 
index 819bd24af76badbaf245e4fda3c6b426c5755fc1..31aa1d3cb3fcd25f36d63747f2b067f7c2fa4923 100644 (file)
@@ -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;
index 25f1b66c9bd796e28cc46cea8bbf39dea6dd7320..accf3235b67e08562347bb4f92aca966dc909c68 100644 (file)
@@ -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\]} } } */
index 5fb145539f4a80b840490effee3acdc79f3df256..43b76495ad850f7ac5ee0fa6400720c17e01055b 100644 (file)
@@ -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]