c++: Simplify va_arg test

Message ID 5d66164f-2ee3-9643-d785-4f5b6d9a9a57@acm.org
State New
Headers show
Series
  • c++: Simplify va_arg test
Related show

Commit Message

Nathan Sidwell April 6, 2021, 12:06 p.m.
The va_arg scans are just too brittle.	Let's not be that picky.  We have 
other tested builtins that are less brittle now anyway.

	gcc/testsuite/
         * g++.dg/modules/builtin-3_a.C:	Remove dump scans.
         * g++.dg/modules/builtin-3_b.C: Remove dump scans.

-- 
Nathan Sidwell

Patch

diff --git i/gcc/testsuite/g++.dg/modules/builtin-3_a.C w/gcc/testsuite/g++.dg/modules/builtin-3_a.C
index fb7da6175c0..66f712928a2 100644
--- i/gcc/testsuite/g++.dg/modules/builtin-3_a.C
+++ w/gcc/testsuite/g++.dg/modules/builtin-3_a.C
@@ -1,4 +1,4 @@ 
-// { dg-additional-options "-fmodules-ts -fdump-lang-module-blocks-alias-uid" }
+// { dg-additional-options -fmodules-ts }
 module;
 #include <stdarg.h>
 export module builtins;
@@ -21,24 +21,3 @@  export inline int count (int a, ...)
 
   return c;
 }
-
-// { dg-final { scan-lang-dump-not {Cluster members:\n  \[0\]=decl declaration '::__builtin_strlen'\n  \[1\]=binding '::__builtin_strlen'\n} module } }
-// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* function_decl:'::__builtin_strlen'@builtins} module } }
-// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) function_decl:'::__builtin_strlen'} module } }
-// { dg-final { scan-lang-dump-not {Writing tree:-[0-9]* function_decl:'__builtin_strlen'\(strlen\)} module } }
-
-// The implementation details of va_list's are target-specific.
-// Usually one of two patterns though
-// { dg-final { scan-lang-dump-not { Cluster members:\n  \[0\]=decl declaration '::__builtin_va_list'\n  \[1\]=binding '::__builtin_va_list'\n} module { target i?86-*-linux* x86_64-*-linux* } } }
-// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* type_decl:'::__builtin_va_list'@builtins} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } }
-// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) type_decl:'::__builtin_va_list'} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } }
-
-// { dg-final { scan-lang-dump {Writing:-1's named merge key \(decl\) type_decl:'::__gnuc_va_list'} module { target i?86-*-linux* *-*-darwin* } } }
-// { dg-final { scan-lang-dump {Wrote GMF:-3 type_decl:'::__gnuc_va_list'@builtins} module { target i?86-*-linux* *-*-darwin* } } }
-
-// { dg-final { scan-lang-dump {Wrote fixed:[0-9]* record_type:'__va_list'} module { target aarch64*-*-linux* } } }
-// { dg-final { scan-lang-dump {Wrote fixed:[0-9]* pointer_type:'::__builtin_va_list'} module { target powerpc*-*-linux* } } }
-
-// { dg-final { scan-lang-dump-not { Cluster members:\n  \[0\]=decl declaration '::va_list'\n  \[1\]=binding '::va_list'\n} module } }
-// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* type_decl:'::va_list'@builtins} module } }
-// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) type_decl:'::va_list'} module } }
diff --git i/gcc/testsuite/g++.dg/modules/builtin-3_b.C w/gcc/testsuite/g++.dg/modules/builtin-3_b.C
index e0e630656d3..7ba933d9aab 100644
--- i/gcc/testsuite/g++.dg/modules/builtin-3_b.C
+++ w/gcc/testsuite/g++.dg/modules/builtin-3_b.C
@@ -1,4 +1,4 @@ 
-// { dg-additional-options "-fmodules-ts -fdump-lang-module-alias" }
+// { dg-additional-options -fmodules-ts }
 import builtins;
 
 int main ()
@@ -6,8 +6,3 @@  int main ()
   length ("");
   count (1, "", "", nullptr);
 }
-
-// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) function_decl:'::__builtin_strlen'} module } }
-// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) type_decl:'::__builtin_va_list'} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } }
-// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::va_list'} module } }
-// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::__gnuc_va_list'} module } }