https://gcc.gnu.org/g:064c6493c879c4c1a989e67ce5adc32c1be83d67

commit r15-5335-g064c6493c879c4c1a989e67ce5adc32c1be83d67
Author: Jason Merrill <ja...@redhat.com>
Date:   Fri Nov 15 22:18:27 2024 -0500

    c++: adjust some tests for modules
    
    We aren't enabling modules by default yet, but let's fix these tests now so
    they won't fail when that happens.
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/template/error25.C: Adjust export diagnostic.
            * g++.old-deja/g++.benjamin/tem05.C: Likewise.
            * g++.old-deja/g++.pt/export1.C: Likewise.
            * g++.dg/pch/pch.exp: Specify -fno-modules.

Diff:
---
 gcc/testsuite/g++.dg/template/error25.C         | 2 +-
 gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C | 8 ++++----
 gcc/testsuite/g++.old-deja/g++.pt/export1.C     | 2 +-
 gcc/testsuite/g++.dg/pch/pch.exp                | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/g++.dg/template/error25.C 
b/gcc/testsuite/g++.dg/template/error25.C
index 77b59cd7ca2a..6aaf67471b52 100644
--- a/gcc/testsuite/g++.dg/template/error25.C
+++ b/gcc/testsuite/g++.dg/template/error25.C
@@ -12,5 +12,5 @@ extern void f2 ();
 template<>
 extern void f2<void> ();  // { dg-error "explicit template specialization 
cannot have a storage class" }
 
-export template<class T>  // { dg-warning "keyword 'export'" }
+export template<class T>  // { dg-message "'export'" }
 static void* f3 ();
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C 
b/gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C
index 7b6b955383b9..81fb5c4c069e 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C
@@ -18,7 +18,7 @@
 
 // 1
 // template definition
-export template <class T>  // { dg-warning "" } 
+export template <class T>  // { dg-message "export" }
 bool templ_one(T a) {
    if (a > 0)
      return true;
@@ -41,15 +41,15 @@ public:
   template <class T2> bool compare_ge(T2 test);
 };
 
-export template <class T> // { dg-warning "" } 
+export template <class T> // { dg-message "export" }
 const bool X_one<T>::is_specialized = false;
 
-export template <class T> // { dg-warning "" } 
+export template <class T> // { dg-message "export" }
 unsigned short X_one<T>::ret_id() {
   return id;
 }
 
-export template <class T2> // { dg-warning "" } 
+export template <class T2> // { dg-message "export" }
 bool compare_ge(T2 test) {
   if (test > type) // { dg-error "" } .*
     return true;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/export1.C 
b/gcc/testsuite/g++.old-deja/g++.pt/export1.C
index 53e7e9b160ce..e79785424d28 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/export1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/export1.C
@@ -15,4 +15,4 @@ return 0;
 }
 
 template <class T> class Y;
-export template <class T> class X;  // { dg-warning "" } export not implemented
+export template <class T> class X;  // { dg-message "export" } export not 
implemented
diff --git a/gcc/testsuite/g++.dg/pch/pch.exp b/gcc/testsuite/g++.dg/pch/pch.exp
index a443e8fc3920..5e3e9b1fdd26 100644
--- a/gcc/testsuite/g++.dg/pch/pch.exp
+++ b/gcc/testsuite/g++.dg/pch/pch.exp
@@ -31,7 +31,7 @@ set old_dg_do_what_default "${dg-do-what-default}"
 foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
     # We don't try to use the loop-optimizing options, since they are highly
     # unlikely to make any difference to PCH.
-    dg-pch $subdir $test [list "-g" "-O2 -g" "-O2"] ".H"
+    dg-flags-pch $subdir $test "-fno-modules" [list "-g" "-O2 -g" "-O2"] ".H"
 }
 
 set dg-do-what-default "$old_dg_do_what_default"

Reply via email to