]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++/modules testsuite: restrict expensive pr99023 test
authorPatrick Palka <ppalka@redhat.com>
Wed, 24 Apr 2024 21:51:54 +0000 (17:51 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 24 Apr 2024 21:51:54 +0000 (17:51 -0400)
The pr99023 testcase uses --param=ggc-min-expand=0 which forces a GC
during every collection point and consequently is very slow to run,
and ends up being the main bottleneck of the modules.exp testsuite.

So this patch restricts this test to run once, in C++20 mode, instead of
multiple times (C++17, C++20 and C++23 mode by default).  After this
patch the modules.exp testsuite finishes in 3m instead of 3m40s with -j8
on my machine.

gcc/testsuite/ChangeLog:

* g++.dg/modules/pr99023_a.X: Run only in C++20 mode.
* g++.dg/modules/pr99023_b.X: Likewise.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/testsuite/g++.dg/modules/pr99023_a.X
gcc/testsuite/g++.dg/modules/pr99023_b.X

index c872d15f7927baa668a430a6476f8d460d068344..507e956953565f7294064abc4dca5406372f445f 100644 (file)
@@ -1,4 +1,5 @@
 // PR c++/99023, ICE
+// { dg-require-effective-target c++20_only }
 // { dg-additional-options {-x c++-system-header initializer_list -fmodules-ts --param ggc-min-expand=0} }
 
 // { dg-prune-output {linker input file unused} }
index ca5f32e5bccbc5118d6413732801e39942598f72..59d32bee8d51c3dad2a9c7389814d812ec2dcb47 100644 (file)
@@ -1,4 +1,5 @@
 // PR c++/99023, ICE
+// { dg-require-effective-target c++20_only }
 // { dg-additional-options {-x c++-system-header iostream -fmodules-ts -flang-info-include-translate=<initializer_list> --param ggc-min-expand=0} }
 
 // { dg-prune-output {linker input file unused} }