Tested on x86_64-pc-linux-gnu, OK for trunk?

-- >8 --

This testcase wasn't running, because adl-5_a had the wrong extension.
adl-5_d should have been reporting an error because 'frob' is only
visible from within the 'hidden' module but this was missed.

gcc/testsuite/ChangeLog:

        * g++.dg/modules/adl-5_a.c: Move to...
        * g++.dg/modules/adl-5_a.C: ...here.
        * g++.dg/modules/adl-5_d.C: Add errors.

Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
---
 gcc/testsuite/g++.dg/modules/{adl-5_a.c => adl-5_a.C} | 0
 gcc/testsuite/g++.dg/modules/adl-5_d.C                | 5 +++--
 2 files changed, 3 insertions(+), 2 deletions(-)
 rename gcc/testsuite/g++.dg/modules/{adl-5_a.c => adl-5_a.C} (100%)

diff --git a/gcc/testsuite/g++.dg/modules/adl-5_a.c 
b/gcc/testsuite/g++.dg/modules/adl-5_a.C
similarity index 100%
rename from gcc/testsuite/g++.dg/modules/adl-5_a.c
rename to gcc/testsuite/g++.dg/modules/adl-5_a.C
diff --git a/gcc/testsuite/g++.dg/modules/adl-5_d.C 
b/gcc/testsuite/g++.dg/modules/adl-5_d.C
index 9c75b6d14a7..09760c5ad01 100644
--- a/gcc/testsuite/g++.dg/modules/adl-5_d.C
+++ b/gcc/testsuite/g++.dg/modules/adl-5_d.C
@@ -7,10 +7,11 @@ int main ()
 {
   X x (2);
 
-  if (frob (x) != 2)
+  if (frob (x) != 2)  // { dg-error "not declared in" }
     return 1;
 
-  if (TPL (x) != 2)
+  // { dg-regexp "\n\[^\n]*adl-5_a.C:9:15: error: 'frob' was not declared in 
this scope$" }
+  if (TPL (x) != 2)  // { dg-message "required from here" }
     return 2;
 
   return 0;
-- 
2.47.0

Reply via email to