]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix g++.dg/modules/adl-5
authorNathaniel Shead <nathanieloshead@gmail.com>
Tue, 11 Feb 2025 11:24:55 +0000 (22:24 +1100)
committerNathaniel Shead <nathanieloshead@gmail.com>
Tue, 11 Feb 2025 11:26:52 +0000 (22:26 +1100)
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 <nathanieloshead@gmail.com>
gcc/testsuite/g++.dg/modules/adl-5_a.C [moved from gcc/testsuite/g++.dg/modules/adl-5_a.c with 100% similarity]
gcc/testsuite/g++.dg/modules/adl-5_d.C

index 9c75b6d14a7ba4fa80d7500aa7f53b69d9cb5bec..cf93b04235586b8d3cc6ff41c17ca0364a676456 100644 (file)
@@ -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:8:15: error: 'frob' was not declared in this scope$" }
+  if (TPL (x) != 2)  // { dg-message "required from here" }
     return 2;
 
   return 0;