testsuite: Fix various scan-assembler identifiers not handling _-prefix
authorHans-Peter Nilsson <hp@axis.com>
Thu, 2 Mar 2023 17:11:20 +0000 (18:11 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Sat, 4 Mar 2023 00:53:20 +0000 (01:53 +0100)
* g++.dg/cpp0x/pr84497.C: Handle USER_LABEL_PREFIX == "_" on
scan-assembler identifiers.
* gcc.dg/debug/btf/btf-enum64-1.c, gcc.dg/ipa/symver1.c: Ditto.

gcc/testsuite/g++.dg/cpp0x/pr84497.C
gcc/testsuite/gcc.dg/debug/btf/btf-enum64-1.c
gcc/testsuite/gcc.dg/ipa/symver1.c

index 7eb1aee474e3bcf754a43844b6672a0886eb8ad0..be5a9d359ec590b90005f65e1014903a412570ea 100644 (file)
@@ -34,6 +34,6 @@ extern thread_local Container container_obj;
 int main() { return !(&base_obj && &derived_obj && &container_obj);}
 #endif
 
-// { dg-final { scan-assembler ".weak\[ \t\]*_ZTH8base_obj" } }
-// { dg-final { scan-assembler ".weak\[ \t\]*_ZTH11derived_obj" } }
-// { dg-final { scan-assembler ".weak\[ \t\]*_ZTH13container_obj" } }
+// { dg-final { scan-assembler ".weak\[ \t\]*_?_ZTH8base_obj" } }
+// { dg-final { scan-assembler ".weak\[ \t\]*_?_ZTH11derived_obj" } }
+// { dg-final { scan-assembler ".weak\[ \t\]*_?_ZTH13container_obj" } }
index e443d4c8c00fcb85152ab7b33b2b288b288d4ed0..5d1487c1183aa3410d56e380509c939056ef8040 100644 (file)
@@ -3,9 +3,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O0 -gbtf -dA" } */
 
-/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]myenum1,\[\t \]8" 1 } } */
-/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]myenum2,\[\t \]8" 1 } } */
-/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]myenum3,\[\t \]8" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]_?myenum1,\[\t \]8" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]_?myenum2,\[\t \]8" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \].size\[\t \]_?myenum3,\[\t \]8" 1 } } */
 /* { dg-final { scan-assembler-times "\[\t \]0x13000003\[\t \]+\[^\n\]*btt_info" 2 } } */
 /* { dg-final { scan-assembler-times "\[\t \]0x93000003\[\t \]+\[^\n\]*btt_info" 1 } } */
 /* { dg-final { scan-assembler-times "\[\t \]0xffffffaa\[\t \]+\[^\n\]*bte_value_lo32" 2 } } */
index 2cd0258366978d83538f3453c85b5e42eac2a12b..d120ed5d76b1d88d4231cedf74a11223f546420a 100644 (file)
@@ -8,5 +8,5 @@ int foo()
   return 2;
 }
 
-/* { dg-final { scan-assembler ".symver.*foo, foo@VER_2" } } */
-/* { dg-final { scan-assembler ".symver.*foo, foo@VER_3" } } */
+/* { dg-final { scan-assembler ".symver.*foo, _?foo@VER_2" } } */
+/* { dg-final { scan-assembler ".symver.*foo, _?foo@VER_3" } } */