Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

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.
---
 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 77b59cd7ca2..6aaf67471b5 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 7b6b955383b..81fb5c4c069 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 53e7e9b160c..e79785424d2 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 a443e8fc392..5e3e9b1fdd2 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"

base-commit: d8af6c203f18b4fd736df9567926589d96f8e0b3
-- 
2.47.0

Reply via email to