https://gcc.gnu.org/g:61fd6a338de5f8468969ce284a6435ce4e251e3e
commit r16-1086-g61fd6a338de5f8468969ce284a6435ce4e251e3e Author: Jason Merrill <ja...@redhat.com> Date: Thu Nov 21 20:43:17 2024 +0100 c++: add -fno-modules to some tests These tests in the modules/ directory specifically want to test behavior without modules enabled, so let's make that explicit. gcc/testsuite/ChangeLog: * g++.dg/modules/cpp-1.C * g++.dg/modules/cpp-3.C * g++.dg/modules/cpp-4.C: Specify -fno-modules. Diff: --- gcc/testsuite/g++.dg/modules/cpp-1.C | 3 ++- gcc/testsuite/g++.dg/modules/cpp-3.C | 1 + gcc/testsuite/g++.dg/modules/cpp-4.C | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/modules/cpp-1.C b/gcc/testsuite/g++.dg/modules/cpp-1.C index 2ad9637c8fb0..56ef05fe6db1 100644 --- a/gcc/testsuite/g++.dg/modules/cpp-1.C +++ b/gcc/testsuite/g++.dg/modules/cpp-1.C @@ -1,4 +1,5 @@ // { dg-do preprocess } +// { dg-additional-options -fno-modules } module bob; #if 1 @@ -11,4 +12,4 @@ import gru; EXPORT import mabel; int i; -// { dg-final { scan-file cpp-1.i "cpp-1.C\"\n\n\nmodule bob;\n\nexport import stuart;\n\n\n\nimport gru;\n\n import mabel;\n" } } +// { dg-final { scan-file cpp-1.i "cpp-1.C\"\n\n\n\nmodule bob;\n\nexport import stuart;\n\n\n\nimport gru;\n\n import mabel;\n" } } diff --git a/gcc/testsuite/g++.dg/modules/cpp-3.C b/gcc/testsuite/g++.dg/modules/cpp-3.C index 3aa0c6ec5f6f..cd776ae81332 100644 --- a/gcc/testsuite/g++.dg/modules/cpp-3.C +++ b/gcc/testsuite/g++.dg/modules/cpp-3.C @@ -1,4 +1,5 @@ // { dg-do preprocess } +// { dg-additional-options -fno-modules } #define NAME(X) X; diff --git a/gcc/testsuite/g++.dg/modules/cpp-4.C b/gcc/testsuite/g++.dg/modules/cpp-4.C index 6c194312311f..c423de20b7b9 100644 --- a/gcc/testsuite/g++.dg/modules/cpp-4.C +++ b/gcc/testsuite/g++.dg/modules/cpp-4.C @@ -1,3 +1,4 @@ +// { dg-additional-options -fno-modules } // { dg-do preprocess } #if 1