As discussed in <https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00752.html> it seems to be a high time we turned on testing C++17 by default.
The only interesting part is at the very end, otherwise most of the changes is just using { target c++17 } instead of explicit dg-options. Removing dg-options has the effect that DEFAULT_CXXFLAGS comes in play, so I've removed a bunch of stray semicolons to fix -Wpedantic errors. I wonder if we also want to enable 2a, but the overhead could be too much. Or use 2a instead of 17? Bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-10-17 Marek Polacek <pola...@redhat.com> * g++.dg/*.C: Use target c++17 instead of explicit dg-options. * lib/g++-dg.exp: Don't test C++11 by default. Add C++17 to the list of default stds to test. diff --git gcc/testsuite/g++.dg/concepts/alias1.C gcc/testsuite/g++.dg/concepts/alias1.C index 1b643cdd1c9..279a4787576 100644 --- gcc/testsuite/g++.dg/concepts/alias1.C +++ gcc/testsuite/g++.dg/concepts/alias1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/alias2.C gcc/testsuite/g++.dg/concepts/alias2.C index 2de2aa4da94..06ffb1af529 100644 --- gcc/testsuite/g++.dg/concepts/alias2.C +++ gcc/testsuite/g++.dg/concepts/alias2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/alias3.C gcc/testsuite/g++.dg/concepts/alias3.C index 6e1c39ce174..2901c041881 100644 --- gcc/testsuite/g++.dg/concepts/alias3.C +++ gcc/testsuite/g++.dg/concepts/alias3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/alias4.C gcc/testsuite/g++.dg/concepts/alias4.C index e7d93d5875f..2c9f5defeb0 100644 --- gcc/testsuite/g++.dg/concepts/alias4.C +++ gcc/testsuite/g++.dg/concepts/alias4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/auto1.C gcc/testsuite/g++.dg/concepts/auto1.C index 0c6fa465fa6..2682940cedd 100644 --- gcc/testsuite/g++.dg/concepts/auto1.C +++ gcc/testsuite/g++.dg/concepts/auto1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T1, class T2> class A { }; diff --git gcc/testsuite/g++.dg/concepts/auto3.C gcc/testsuite/g++.dg/concepts/auto3.C index 7b80fe314b8..abfb2019125 100644 --- gcc/testsuite/g++.dg/concepts/auto3.C +++ gcc/testsuite/g++.dg/concepts/auto3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class...> class tuple {}; diff --git gcc/testsuite/g++.dg/concepts/auto4.C gcc/testsuite/g++.dg/concepts/auto4.C index e80341ec038..4eb2ae8f7d5 100644 --- gcc/testsuite/g++.dg/concepts/auto4.C +++ gcc/testsuite/g++.dg/concepts/auto4.C @@ -1,5 +1,6 @@ // PR c++/85006 -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } template<typename... Ts> struct A {}; diff --git gcc/testsuite/g++.dg/concepts/class-deduction1.C gcc/testsuite/g++.dg/concepts/class-deduction1.C index 476830d9252..936dd6826f0 100644 --- gcc/testsuite/g++.dg/concepts/class-deduction1.C +++ gcc/testsuite/g++.dg/concepts/class-deduction1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool Isint = __is_same_as(T,int); diff --git gcc/testsuite/g++.dg/concepts/class-deduction2.C gcc/testsuite/g++.dg/concepts/class-deduction2.C index 286e59a5039..e0718d1d0cf 100644 --- gcc/testsuite/g++.dg/concepts/class-deduction2.C +++ gcc/testsuite/g++.dg/concepts/class-deduction2.C @@ -1,5 +1,6 @@ // PR c++/85706 -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } template<class T> struct S { S(T); diff --git gcc/testsuite/g++.dg/concepts/class.C gcc/testsuite/g++.dg/concepts/class.C index 1c5242f8089..dc5523e2407 100644 --- gcc/testsuite/g++.dg/concepts/class.C +++ gcc/testsuite/g++.dg/concepts/class.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/class1.C gcc/testsuite/g++.dg/concepts/class1.C index 94a5d23a873..a738e6e82cd 100644 --- gcc/testsuite/g++.dg/concepts/class1.C +++ gcc/testsuite/g++.dg/concepts/class1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/class2.C gcc/testsuite/g++.dg/concepts/class2.C index 63891282085..ec8718114a7 100644 --- gcc/testsuite/g++.dg/concepts/class2.C +++ gcc/testsuite/g++.dg/concepts/class2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/class3.C gcc/testsuite/g++.dg/concepts/class3.C index b2757567d4f..256370df46d 100644 --- gcc/testsuite/g++.dg/concepts/class3.C +++ gcc/testsuite/g++.dg/concepts/class3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/class4.C gcc/testsuite/g++.dg/concepts/class4.C index 86eecbc4572..b583e55411d 100644 --- gcc/testsuite/g++.dg/concepts/class4.C +++ gcc/testsuite/g++.dg/concepts/class4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/class5.C gcc/testsuite/g++.dg/concepts/class5.C index 76398609709..7bf620edc5c 100644 --- gcc/testsuite/g++.dg/concepts/class5.C +++ gcc/testsuite/g++.dg/concepts/class5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool One() { return sizeof(T) >= 4; } diff --git gcc/testsuite/g++.dg/concepts/class6.C gcc/testsuite/g++.dg/concepts/class6.C index 29dcb8ff97e..bdd60918c8e 100644 --- gcc/testsuite/g++.dg/concepts/class6.C +++ gcc/testsuite/g++.dg/concepts/class6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool One() { return sizeof(T) >= 4; } diff --git gcc/testsuite/g++.dg/concepts/constrained-parm.C gcc/testsuite/g++.dg/concepts/constrained-parm.C index feaf3bb6429..c2b6614aeea 100644 --- gcc/testsuite/g++.dg/concepts/constrained-parm.C +++ gcc/testsuite/g++.dg/concepts/constrained-parm.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/debug1.C gcc/testsuite/g++.dg/concepts/debug1.C index eeb63654243..87f2ac90b20 100644 --- gcc/testsuite/g++.dg/concepts/debug1.C +++ gcc/testsuite/g++.dg/concepts/debug1.C @@ -1,5 +1,6 @@ // PR c++/84551 -// { dg-options "-g -O -std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-g -O -fconcepts" } template<typename> concept bool C() { return true; } diff --git gcc/testsuite/g++.dg/concepts/decl-diagnose.C gcc/testsuite/g++.dg/concepts/decl-diagnose.C index caf6b2e5e3f..7ac7872efb5 100644 --- gcc/testsuite/g++.dg/concepts/decl-diagnose.C +++ gcc/testsuite/g++.dg/concepts/decl-diagnose.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" } diff --git gcc/testsuite/g++.dg/concepts/deduction-constraint1.C gcc/testsuite/g++.dg/concepts/deduction-constraint1.C index 5eec87b3c0b..bebbda1a1fa 100644 --- gcc/testsuite/g++.dg/concepts/deduction-constraint1.C +++ gcc/testsuite/g++.dg/concepts/deduction-constraint1.C @@ -1,5 +1,6 @@ // PR c++/67007 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class U> concept bool A = diff --git gcc/testsuite/g++.dg/concepts/diagnostic1.C gcc/testsuite/g++.dg/concepts/diagnostic1.C index c977eaa8fcd..9bb15060573 100644 --- gcc/testsuite/g++.dg/concepts/diagnostic1.C +++ gcc/testsuite/g++.dg/concepts/diagnostic1.C @@ -1,5 +1,6 @@ // PR c++/67159 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U> concept bool SameAs = __is_same_as(T, U); diff --git gcc/testsuite/g++.dg/concepts/disjunction1.C gcc/testsuite/g++.dg/concepts/disjunction1.C index 9bd50974f57..930adf405c9 100644 --- gcc/testsuite/g++.dg/concepts/disjunction1.C +++ gcc/testsuite/g++.dg/concepts/disjunction1.C @@ -1,5 +1,6 @@ // PR c++/66962 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <typename> struct remove_cv; template <typename> struct is_reference; diff --git gcc/testsuite/g++.dg/concepts/dr1430.C gcc/testsuite/g++.dg/concepts/dr1430.C index 9fd4f4301fc..f865d5ec2c7 100644 --- gcc/testsuite/g++.dg/concepts/dr1430.C +++ gcc/testsuite/g++.dg/concepts/dr1430.C @@ -1,5 +1,6 @@ // PR c++/66092 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <type_traits> diff --git gcc/testsuite/g++.dg/concepts/equiv.C gcc/testsuite/g++.dg/concepts/equiv.C index d666d9a7567..faec3543461 100644 --- gcc/testsuite/g++.dg/concepts/equiv.C +++ gcc/testsuite/g++.dg/concepts/equiv.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check equivalence of short- and longhand declarations. diff --git gcc/testsuite/g++.dg/concepts/equiv2.C gcc/testsuite/g++.dg/concepts/equiv2.C index 694d87a2c56..2094ca9f388 100644 --- gcc/testsuite/g++.dg/concepts/equiv2.C +++ gcc/testsuite/g++.dg/concepts/equiv2.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } // template<typename T> diff --git gcc/testsuite/g++.dg/concepts/explicit-inst1.C gcc/testsuite/g++.dg/concepts/explicit-inst1.C index 58d8dec0db6..99bd72e069c 100644 --- gcc/testsuite/g++.dg/concepts/explicit-inst1.C +++ gcc/testsuite/g++.dg/concepts/explicit-inst1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-inst2.C gcc/testsuite/g++.dg/concepts/explicit-inst2.C index f47b7585e62..ea313876f01 100644 --- gcc/testsuite/g++.dg/concepts/explicit-inst2.C +++ gcc/testsuite/g++.dg/concepts/explicit-inst2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-inst3.C gcc/testsuite/g++.dg/concepts/explicit-inst3.C index 00dee2fb2b9..18d3c496f38 100644 --- gcc/testsuite/g++.dg/concepts/explicit-inst3.C +++ gcc/testsuite/g++.dg/concepts/explicit-inst3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-inst4.C gcc/testsuite/g++.dg/concepts/explicit-inst4.C index c0f585c957a..20f43770539 100644 --- gcc/testsuite/g++.dg/concepts/explicit-inst4.C +++ gcc/testsuite/g++.dg/concepts/explicit-inst4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-spec1.C gcc/testsuite/g++.dg/concepts/explicit-spec1.C index 38730680e14..bff06f21b6f 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec1.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec1.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/explicit-spec2.C gcc/testsuite/g++.dg/concepts/explicit-spec2.C index 17d48e7c220..ca8b8a037bc 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec2.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-spec3.C gcc/testsuite/g++.dg/concepts/explicit-spec3.C index 1edc83e95a8..fd48da1c280 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec3.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/explicit-spec4.C gcc/testsuite/g++.dg/concepts/explicit-spec4.C index 963c030d464..75a2dec6f49 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec4.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec4.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/explicit-spec5.C gcc/testsuite/g++.dg/concepts/explicit-spec5.C index e0d89bce2d6..d83eec11bc2 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec5.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/explicit-spec6.C gcc/testsuite/g++.dg/concepts/explicit-spec6.C index 0af1df46d60..b5487072e22 100644 --- gcc/testsuite/g++.dg/concepts/explicit-spec6.C +++ gcc/testsuite/g++.dg/concepts/explicit-spec6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> struct A { diff --git gcc/testsuite/g++.dg/concepts/expression.C gcc/testsuite/g++.dg/concepts/expression.C index 6430f89e309..33dad0a47a6 100644 --- gcc/testsuite/g++.dg/concepts/expression.C +++ gcc/testsuite/g++.dg/concepts/expression.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> #include <iostream> diff --git gcc/testsuite/g++.dg/concepts/expression2.C gcc/testsuite/g++.dg/concepts/expression2.C index 3583452d47e..c5447df1d87 100644 --- gcc/testsuite/g++.dg/concepts/expression2.C +++ gcc/testsuite/g++.dg/concepts/expression2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1() diff --git gcc/testsuite/g++.dg/concepts/expression3.C gcc/testsuite/g++.dg/concepts/expression3.C index 4148aa6511e..26b829d338d 100644 --- gcc/testsuite/g++.dg/concepts/expression3.C +++ gcc/testsuite/g++.dg/concepts/expression3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() diff --git gcc/testsuite/g++.dg/concepts/feature-macro.C gcc/testsuite/g++.dg/concepts/feature-macro.C index ad2bfb080a0..d3d9b5420a8 100644 --- gcc/testsuite/g++.dg/concepts/feature-macro.C +++ gcc/testsuite/g++.dg/concepts/feature-macro.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git gcc/testsuite/g++.dg/concepts/fn-concept1.C gcc/testsuite/g++.dg/concepts/fn-concept1.C index b858c1ac93f..a4ade7c628d 100644 --- gcc/testsuite/g++.dg/concepts/fn-concept1.C +++ gcc/testsuite/g++.dg/concepts/fn-concept1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Tuple() { // { dg-error "multiple statements" } diff --git gcc/testsuite/g++.dg/concepts/fn-concept2.C gcc/testsuite/g++.dg/concepts/fn-concept2.C index fe88dce1bd4..0d70728abe8 100644 --- gcc/testsuite/g++.dg/concepts/fn-concept2.C +++ gcc/testsuite/g++.dg/concepts/fn-concept2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept auto C1() { return 0; } // { dg-error "16:concept .concept auto C1\\(\\). declared with a deduced return type" } diff --git gcc/testsuite/g++.dg/concepts/fn1.C gcc/testsuite/g++.dg/concepts/fn1.C index 800a0d36f0b..17f14b9a46b 100644 --- gcc/testsuite/g++.dg/concepts/fn1.C +++ gcc/testsuite/g++.dg/concepts/fn1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/fn10.C gcc/testsuite/g++.dg/concepts/fn10.C index 71bd82c5f60..6993f34a89f 100644 --- gcc/testsuite/g++.dg/concepts/fn10.C +++ gcc/testsuite/g++.dg/concepts/fn10.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Test that constraint satisfaction checks work even when // processing template declarations. diff --git gcc/testsuite/g++.dg/concepts/fn2.C gcc/testsuite/g++.dg/concepts/fn2.C index 67e35acc362..250e0a8713a 100644 --- gcc/testsuite/g++.dg/concepts/fn2.C +++ gcc/testsuite/g++.dg/concepts/fn2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/fn3.C gcc/testsuite/g++.dg/concepts/fn3.C index 6695f2f98a6..bc0e126c96c 100644 --- gcc/testsuite/g++.dg/concepts/fn3.C +++ gcc/testsuite/g++.dg/concepts/fn3.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/fn4.C gcc/testsuite/g++.dg/concepts/fn4.C index ecc3d7b1bee..830a1747865 100644 --- gcc/testsuite/g++.dg/concepts/fn4.C +++ gcc/testsuite/g++.dg/concepts/fn4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/fn5.C gcc/testsuite/g++.dg/concepts/fn5.C index d4a2e003b9c..018b12f86e1 100644 --- gcc/testsuite/g++.dg/concepts/fn5.C +++ gcc/testsuite/g++.dg/concepts/fn5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check shorthand notation. diff --git gcc/testsuite/g++.dg/concepts/fn6.C gcc/testsuite/g++.dg/concepts/fn6.C index 12936076449..97155f8eb86 100644 --- gcc/testsuite/g++.dg/concepts/fn6.C +++ gcc/testsuite/g++.dg/concepts/fn6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Redefinition errors. diff --git gcc/testsuite/g++.dg/concepts/fn7.C gcc/testsuite/g++.dg/concepts/fn7.C index 1df21fe9024..0052f1aee73 100644 --- gcc/testsuite/g++.dg/concepts/fn7.C +++ gcc/testsuite/g++.dg/concepts/fn7.C @@ -1,5 +1,5 @@ -// { dg-do link } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do link { target c++17 } } +// { dg-options "-fconcepts" } // FIXME: What is this actually testing? diff --git gcc/testsuite/g++.dg/concepts/fn8.C gcc/testsuite/g++.dg/concepts/fn8.C index b91f1ae9511..a3daf4e1bad 100644 --- gcc/testsuite/g++.dg/concepts/fn8.C +++ gcc/testsuite/g++.dg/concepts/fn8.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/fn9.C gcc/testsuite/g++.dg/concepts/fn9.C index 1efde5f744a..84ed77ce1c1 100644 --- gcc/testsuite/g++.dg/concepts/fn9.C +++ gcc/testsuite/g++.dg/concepts/fn9.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/friend1.C gcc/testsuite/g++.dg/concepts/friend1.C index c437c79d01f..9050b557b3b 100644 --- gcc/testsuite/g++.dg/concepts/friend1.C +++ gcc/testsuite/g++.dg/concepts/friend1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Eq() { return requires(T t) { t == t; }; } diff --git gcc/testsuite/g++.dg/concepts/friend2.C gcc/testsuite/g++.dg/concepts/friend2.C index 5f14905a738..8ef600222e5 100644 --- gcc/testsuite/g++.dg/concepts/friend2.C +++ gcc/testsuite/g++.dg/concepts/friend2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Eq() { return requires(T t) { t == t; }; } diff --git gcc/testsuite/g++.dg/concepts/generic-fn-err.C gcc/testsuite/g++.dg/concepts/generic-fn-err.C index c34f832816e..5a9556531e7 100644 --- gcc/testsuite/g++.dg/concepts/generic-fn-err.C +++ gcc/testsuite/g++.dg/concepts/generic-fn-err.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/generic-fn.C gcc/testsuite/g++.dg/concepts/generic-fn.C index 7a48e7640d0..3b10327a493 100644 --- gcc/testsuite/g++.dg/concepts/generic-fn.C +++ gcc/testsuite/g++.dg/concepts/generic-fn.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> #include <type_traits> diff --git gcc/testsuite/g++.dg/concepts/iconv1.C gcc/testsuite/g++.dg/concepts/iconv1.C index 38a0b17b1f8..e99254f3c27 100644 --- gcc/testsuite/g++.dg/concepts/iconv1.C +++ gcc/testsuite/g++.dg/concepts/iconv1.C @@ -1,5 +1,6 @@ // PR c++/67240 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } int foo(int x) { diff --git gcc/testsuite/g++.dg/concepts/inherit-ctor1.C gcc/testsuite/g++.dg/concepts/inherit-ctor1.C index 952c8f61ef4..4b3f5619331 100644 --- gcc/testsuite/g++.dg/concepts/inherit-ctor1.C +++ gcc/testsuite/g++.dg/concepts/inherit-ctor1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/inherit-ctor2.C gcc/testsuite/g++.dg/concepts/inherit-ctor2.C index b36b993098a..cb81d13e6d9 100644 --- gcc/testsuite/g++.dg/concepts/inherit-ctor2.C +++ gcc/testsuite/g++.dg/concepts/inherit-ctor2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/inherit-ctor3.C gcc/testsuite/g++.dg/concepts/inherit-ctor3.C index c7ad84aa6e7..6f046323346 100644 --- gcc/testsuite/g++.dg/concepts/inherit-ctor3.C +++ gcc/testsuite/g++.dg/concepts/inherit-ctor3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/inherit-ctor4.C gcc/testsuite/g++.dg/concepts/inherit-ctor4.C index 26940ba44be..43df6e67186 100644 --- gcc/testsuite/g++.dg/concepts/inherit-ctor4.C +++ gcc/testsuite/g++.dg/concepts/inherit-ctor4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/intro1.C gcc/testsuite/g++.dg/concepts/intro1.C index ac8a708b107..84fa6dbbed4 100644 --- gcc/testsuite/g++.dg/concepts/intro1.C +++ gcc/testsuite/g++.dg/concepts/intro1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C = __is_class(T); diff --git gcc/testsuite/g++.dg/concepts/intro2.C gcc/testsuite/g++.dg/concepts/intro2.C index 928cc2e5487..9c7c1733c6d 100644 --- gcc/testsuite/g++.dg/concepts/intro2.C +++ gcc/testsuite/g++.dg/concepts/intro2.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/intro3.C gcc/testsuite/g++.dg/concepts/intro3.C index 78d091d3a88..5e93f313270 100644 --- gcc/testsuite/g++.dg/concepts/intro3.C +++ gcc/testsuite/g++.dg/concepts/intro3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename ... T> concept bool C1 = true; diff --git gcc/testsuite/g++.dg/concepts/intro4.C gcc/testsuite/g++.dg/concepts/intro4.C index 2a3e2ba17e4..a7e513535aa 100644 --- gcc/testsuite/g++.dg/concepts/intro4.C +++ gcc/testsuite/g++.dg/concepts/intro4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename ... T> concept bool C1 = true; diff --git gcc/testsuite/g++.dg/concepts/intro5.C gcc/testsuite/g++.dg/concepts/intro5.C index c5fac8000c3..e7cd7a48066 100644 --- gcc/testsuite/g++.dg/concepts/intro5.C +++ gcc/testsuite/g++.dg/concepts/intro5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T, typename U = int> concept bool C() diff --git gcc/testsuite/g++.dg/concepts/intro6.C gcc/testsuite/g++.dg/concepts/intro6.C index 6624c8888a9..57b325a0e38 100644 --- gcc/testsuite/g++.dg/concepts/intro6.C +++ gcc/testsuite/g++.dg/concepts/intro6.C @@ -1,5 +1,6 @@ // PR c++/67003 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } namespace X { template<class> diff --git gcc/testsuite/g++.dg/concepts/intro7.C gcc/testsuite/g++.dg/concepts/intro7.C index 9cb4a76740b..d5bdc7e2789 100644 --- gcc/testsuite/g++.dg/concepts/intro7.C +++ gcc/testsuite/g++.dg/concepts/intro7.C @@ -1,5 +1,6 @@ // PR c++/66985 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <template <class> class T> concept bool _Valid = requires { typename T<int>; }; diff --git gcc/testsuite/g++.dg/concepts/locations1.C gcc/testsuite/g++.dg/concepts/locations1.C index 6e7529b0ee1..33c3b6227c7 100644 --- gcc/testsuite/g++.dg/concepts/locations1.C +++ gcc/testsuite/g++.dg/concepts/locations1.C @@ -1,4 +1,5 @@ -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } struct S { diff --git gcc/testsuite/g++.dg/concepts/member-concept.C gcc/testsuite/g++.dg/concepts/member-concept.C index 4eae9f5b301..ef577a19d07 100644 --- gcc/testsuite/g++.dg/concepts/member-concept.C +++ gcc/testsuite/g++.dg/concepts/member-concept.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct Base { template<typename T> diff --git gcc/testsuite/g++.dg/concepts/memfun-err.C gcc/testsuite/g++.dg/concepts/memfun-err.C index a42554ad31a..69ce6b845d1 100644 --- gcc/testsuite/g++.dg/concepts/memfun-err.C +++ gcc/testsuite/g++.dg/concepts/memfun-err.C @@ -1,5 +1,5 @@ -// { dg-do run} -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> diff --git gcc/testsuite/g++.dg/concepts/memfun.C gcc/testsuite/g++.dg/concepts/memfun.C index d387234312a..818c7e61c8a 100644 --- gcc/testsuite/g++.dg/concepts/memfun.C +++ gcc/testsuite/g++.dg/concepts/memfun.C @@ -1,5 +1,5 @@ -// { dg-do run} -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include <cassert> diff --git gcc/testsuite/g++.dg/concepts/memfun2.C gcc/testsuite/g++.dg/concepts/memfun2.C index a5965fc869c..78a2cf7bada 100644 --- gcc/testsuite/g++.dg/concepts/memfun2.C +++ gcc/testsuite/g++.dg/concepts/memfun2.C @@ -1,5 +1,6 @@ // PR c++/72415 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<int... Indices> struct indices {}; diff --git gcc/testsuite/g++.dg/concepts/memtmpl1.C gcc/testsuite/g++.dg/concepts/memtmpl1.C index fe0f1d5df69..dc00a07a22b 100644 --- gcc/testsuite/g++.dg/concepts/memtmpl1.C +++ gcc/testsuite/g++.dg/concepts/memtmpl1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> struct A { diff --git gcc/testsuite/g++.dg/concepts/partial-concept-id1.C gcc/testsuite/g++.dg/concepts/partial-concept-id1.C index 90a8ec72b21..5f0f3468ea1 100644 --- gcc/testsuite/g++.dg/concepts/partial-concept-id1.C +++ gcc/testsuite/g++.dg/concepts/partial-concept-id1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Type() { return true; } diff --git gcc/testsuite/g++.dg/concepts/partial-concept-id2.C gcc/testsuite/g++.dg/concepts/partial-concept-id2.C index 4c1373a0eda..e51894bb1c0 100644 --- gcc/testsuite/g++.dg/concepts/partial-concept-id2.C +++ gcc/testsuite/g++.dg/concepts/partial-concept-id2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Make sure that we check partial concept ids // with variable concepts. diff --git gcc/testsuite/g++.dg/concepts/partial-spec.C gcc/testsuite/g++.dg/concepts/partial-spec.C index c3836d445cc..0ff8ec2fa1a 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec.C +++ gcc/testsuite/g++.dg/concepts/partial-spec.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check that constraints don't break unconstrained partial // specializations. diff --git gcc/testsuite/g++.dg/concepts/partial-spec2.C gcc/testsuite/g++.dg/concepts/partial-spec2.C index 26d0ff42f55..2449c37fc99 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec2.C +++ gcc/testsuite/g++.dg/concepts/partial-spec2.C @@ -1,5 +1,6 @@ // PR c++/67084 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> constexpr bool p = false; diff --git gcc/testsuite/g++.dg/concepts/partial-spec3.C gcc/testsuite/g++.dg/concepts/partial-spec3.C index 2ac5b9818e5..d4071814909 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec3.C +++ gcc/testsuite/g++.dg/concepts/partial-spec3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> struct A { }; template <class T> requires false struct A<T*> { }; diff --git gcc/testsuite/g++.dg/concepts/partial-spec4.C gcc/testsuite/g++.dg/concepts/partial-spec4.C index 5669bd4ec85..70461b4370f 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec4.C +++ gcc/testsuite/g++.dg/concepts/partial-spec4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool is_int = __is_same_as(T,int); diff --git gcc/testsuite/g++.dg/concepts/partial-spec5.C gcc/testsuite/g++.dg/concepts/partial-spec5.C index 18ef242c271..a5b853cfb3f 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec5.C +++ gcc/testsuite/g++.dg/concepts/partial-spec5.C @@ -1,5 +1,6 @@ // PR c++/67138 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool _Auto = true; diff --git gcc/testsuite/g++.dg/concepts/partial-spec6.C gcc/testsuite/g++.dg/concepts/partial-spec6.C index af4411baae5..1d80ee36e5c 100644 --- gcc/testsuite/g++.dg/concepts/partial-spec6.C +++ gcc/testsuite/g++.dg/concepts/partial-spec6.C @@ -1,5 +1,6 @@ // PR c++/67152 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool HasType = requires { typename T::type; }; diff --git gcc/testsuite/g++.dg/concepts/placeholder1.C gcc/testsuite/g++.dg/concepts/placeholder1.C index bf7f959e227..edd00033603 100644 --- gcc/testsuite/g++.dg/concepts/placeholder1.C +++ gcc/testsuite/g++.dg/concepts/placeholder1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T, typename U> struct is_same diff --git gcc/testsuite/g++.dg/concepts/placeholder2.C gcc/testsuite/g++.dg/concepts/placeholder2.C index c8981b617de..3d6fc813a6a 100644 --- gcc/testsuite/g++.dg/concepts/placeholder2.C +++ gcc/testsuite/g++.dg/concepts/placeholder2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check argument deduction constraints. // TODO: We shoul have more of these... diff --git gcc/testsuite/g++.dg/concepts/placeholder3.C gcc/testsuite/g++.dg/concepts/placeholder3.C index 44dba8b98a2..93f0c0d161f 100644 --- gcc/testsuite/g++.dg/concepts/placeholder3.C +++ gcc/testsuite/g++.dg/concepts/placeholder3.C @@ -1,5 +1,6 @@ // PR c++/66218 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U> concept bool Same = __is_same_as(T, U); diff --git gcc/testsuite/g++.dg/concepts/placeholder4.C gcc/testsuite/g++.dg/concepts/placeholder4.C index b35238c1ce2..d1308137c04 100644 --- gcc/testsuite/g++.dg/concepts/placeholder4.C +++ gcc/testsuite/g++.dg/concepts/placeholder4.C @@ -1,5 +1,6 @@ // PR c++/66218 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U> concept bool Same = __is_same_as(T, U); diff --git gcc/testsuite/g++.dg/concepts/placeholder5.C gcc/testsuite/g++.dg/concepts/placeholder5.C index c0b67b9e78c..245e27a75ed 100644 --- gcc/testsuite/g++.dg/concepts/placeholder5.C +++ gcc/testsuite/g++.dg/concepts/placeholder5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U> concept bool Same = __is_same_as(T, U); diff --git gcc/testsuite/g++.dg/concepts/placeholder6.C gcc/testsuite/g++.dg/concepts/placeholder6.C index ab56c637d3e..51282d93a5d 100644 --- gcc/testsuite/g++.dg/concepts/placeholder6.C +++ gcc/testsuite/g++.dg/concepts/placeholder6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <int I> struct B { static const int i = I; }; template <int I> concept bool Few = I < 10; diff --git gcc/testsuite/g++.dg/concepts/pr65552.C gcc/testsuite/g++.dg/concepts/pr65552.C index 57375d74802..318fdccfbdc 100644 --- gcc/testsuite/g++.dg/concepts/pr65552.C +++ gcc/testsuite/g++.dg/concepts/pr65552.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Concept() { diff --git gcc/testsuite/g++.dg/concepts/pr65575.C gcc/testsuite/g++.dg/concepts/pr65575.C index 6745b843d31..efaf958121b 100644 --- gcc/testsuite/g++.dg/concepts/pr65575.C +++ gcc/testsuite/g++.dg/concepts/pr65575.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C = false; diff --git gcc/testsuite/g++.dg/concepts/pr65634.C gcc/testsuite/g++.dg/concepts/pr65634.C index db36a6be29f..e383653b6a3 100644 --- gcc/testsuite/g++.dg/concepts/pr65634.C +++ gcc/testsuite/g++.dg/concepts/pr65634.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1() { diff --git gcc/testsuite/g++.dg/concepts/pr65636.C gcc/testsuite/g++.dg/concepts/pr65636.C index 01c72a7fac4..2aec0e545d2 100644 --- gcc/testsuite/g++.dg/concepts/pr65636.C +++ gcc/testsuite/g++.dg/concepts/pr65636.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } using TD = int; diff --git gcc/testsuite/g++.dg/concepts/pr65681.C gcc/testsuite/g++.dg/concepts/pr65681.C index 1df9a5949d8..0d8a69d0bd1 100644 --- gcc/testsuite/g++.dg/concepts/pr65681.C +++ gcc/testsuite/g++.dg/concepts/pr65681.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() diff --git gcc/testsuite/g++.dg/concepts/pr65848.C gcc/testsuite/g++.dg/concepts/pr65848.C index 5af6e7dc622..067801844dc 100644 --- gcc/testsuite/g++.dg/concepts/pr65848.C +++ gcc/testsuite/g++.dg/concepts/pr65848.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Performance test... This should be fast. diff --git gcc/testsuite/g++.dg/concepts/pr65854.C gcc/testsuite/g++.dg/concepts/pr65854.C index 395fac4f501..28eac885a46 100644 --- gcc/testsuite/g++.dg/concepts/pr65854.C +++ gcc/testsuite/g++.dg/concepts/pr65854.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Handle alias templates in type requirements. diff --git gcc/testsuite/g++.dg/concepts/pr66091.C gcc/testsuite/g++.dg/concepts/pr66091.C index e5b3c287c84..a71cd7b8bee 100644 --- gcc/testsuite/g++.dg/concepts/pr66091.C +++ gcc/testsuite/g++.dg/concepts/pr66091.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1() diff --git gcc/testsuite/g++.dg/concepts/pr67249.C gcc/testsuite/g++.dg/concepts/pr67249.C index 87e9bb58248..a0eca9ba8c0 100644 --- gcc/testsuite/g++.dg/concepts/pr67249.C +++ gcc/testsuite/g++.dg/concepts/pr67249.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<class T> concept bool C1 = true; template<class A, class B> struct Pair {}; diff --git gcc/testsuite/g++.dg/concepts/pr67595.C gcc/testsuite/g++.dg/concepts/pr67595.C index 76d1fe62132..7b5d712512e 100644 --- gcc/testsuite/g++.dg/concepts/pr67595.C +++ gcc/testsuite/g++.dg/concepts/pr67595.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class X> concept bool allocatable = requires{{new X}->X * }; template <class X> concept bool semiregular = allocatable<X>; diff --git gcc/testsuite/g++.dg/concepts/pr68434.C gcc/testsuite/g++.dg/concepts/pr68434.C index 19ce383246a..fc458989c34 100644 --- gcc/testsuite/g++.dg/concepts/pr68434.C +++ gcc/testsuite/g++.dg/concepts/pr68434.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class> concept bool C1 () { diff --git gcc/testsuite/g++.dg/concepts/pr68683.C gcc/testsuite/g++.dg/concepts/pr68683.C index 31a98f3cf88..ff7709e40aa 100644 --- gcc/testsuite/g++.dg/concepts/pr68683.C +++ gcc/testsuite/g++.dg/concepts/pr68683.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <typename, typename> struct is_same { diff --git gcc/testsuite/g++.dg/concepts/pr71368.C gcc/testsuite/g++.dg/concepts/pr71368.C index f0e0a956366..5cd2b54cd7c 100644 --- gcc/testsuite/g++.dg/concepts/pr71368.C +++ gcc/testsuite/g++.dg/concepts/pr71368.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct inner; diff --git gcc/testsuite/g++.dg/concepts/pr71385.C gcc/testsuite/g++.dg/concepts/pr71385.C index bd5d08cb6f0..42d21f57161 100644 --- gcc/testsuite/g++.dg/concepts/pr71385.C +++ gcc/testsuite/g++.dg/concepts/pr71385.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<class T> concept bool Addable(){ diff --git gcc/testsuite/g++.dg/concepts/req-neg1.C gcc/testsuite/g++.dg/concepts/req-neg1.C index 97b45cd15f0..637f9932870 100644 --- gcc/testsuite/g++.dg/concepts/req-neg1.C +++ gcc/testsuite/g++.dg/concepts/req-neg1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } void f1(int a) requires true; // OK auto f2(int a) -> bool requires true; // OK diff --git gcc/testsuite/g++.dg/concepts/req1.C gcc/testsuite/g++.dg/concepts/req1.C index 688cb19ad43..fedea73587c 100644 --- gcc/testsuite/g++.dg/concepts/req1.C +++ gcc/testsuite/g++.dg/concepts/req1.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class () { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/req10.C gcc/testsuite/g++.dg/concepts/req10.C index 8cbd89f294b..949859ccce0 100644 --- gcc/testsuite/g++.dg/concepts/req10.C +++ gcc/testsuite/g++.dg/concepts/req10.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Test that standard conversions are checked with // implicit conversion constraints. diff --git gcc/testsuite/g++.dg/concepts/req11.C gcc/testsuite/g++.dg/concepts/req11.C index 2d0c5c005d9..8891cce08a9 100644 --- gcc/testsuite/g++.dg/concepts/req11.C +++ gcc/testsuite/g++.dg/concepts/req11.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check that we can evaluate constant requires-expressions // as constant expressions, for the curious case when they diff --git gcc/testsuite/g++.dg/concepts/req12.C gcc/testsuite/g++.dg/concepts/req12.C index 38c2c3e1ada..c6b345a08e9 100644 --- gcc/testsuite/g++.dg/concepts/req12.C +++ gcc/testsuite/g++.dg/concepts/req12.C @@ -1,5 +1,6 @@ // PR c++/66218 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <type_traits> diff --git gcc/testsuite/g++.dg/concepts/req13.C gcc/testsuite/g++.dg/concepts/req13.C index 2f58742c532..4fd2312ef8c 100644 --- gcc/testsuite/g++.dg/concepts/req13.C +++ gcc/testsuite/g++.dg/concepts/req13.C @@ -1,5 +1,6 @@ // PR c++/66758 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class...Args> concept bool Constructible = diff --git gcc/testsuite/g++.dg/concepts/req14.C gcc/testsuite/g++.dg/concepts/req14.C index de00a1eb49c..6e60b6f194f 100644 --- gcc/testsuite/g++.dg/concepts/req14.C +++ gcc/testsuite/g++.dg/concepts/req14.C @@ -1,5 +1,6 @@ // PR c++/66758 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U> concept bool C = requires (T t, U u) { t + u; }; diff --git gcc/testsuite/g++.dg/concepts/req15.C gcc/testsuite/g++.dg/concepts/req15.C index 53d796c1a84..385d51da8cd 100644 --- gcc/testsuite/g++.dg/concepts/req15.C +++ gcc/testsuite/g++.dg/concepts/req15.C @@ -1,5 +1,6 @@ // PR c++/66832 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class U, unsigned N> requires requires (T& t, U &u) { t.foo(); u.foo(); } diff --git gcc/testsuite/g++.dg/concepts/req16.C gcc/testsuite/g++.dg/concepts/req16.C index ee80da078cd..ca04d60180c 100644 --- gcc/testsuite/g++.dg/concepts/req16.C +++ gcc/testsuite/g++.dg/concepts/req16.C @@ -1,5 +1,6 @@ // PR c++/66988 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <type_traits> diff --git gcc/testsuite/g++.dg/concepts/req17.C gcc/testsuite/g++.dg/concepts/req17.C index e1e3eac416c..472cfef34a0 100644 --- gcc/testsuite/g++.dg/concepts/req17.C +++ gcc/testsuite/g++.dg/concepts/req17.C @@ -1,5 +1,6 @@ // PR c++/67018 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <typename T> constexpr bool Val = true; diff --git gcc/testsuite/g++.dg/concepts/req18.C gcc/testsuite/g++.dg/concepts/req18.C index 5ddb9e7dda9..cccfaed7bb6 100644 --- gcc/testsuite/g++.dg/concepts/req18.C +++ gcc/testsuite/g++.dg/concepts/req18.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class> struct all_same { static constexpr bool value = 1; diff --git gcc/testsuite/g++.dg/concepts/req19.C gcc/testsuite/g++.dg/concepts/req19.C index d52ac23ddda..97cd9e52fe2 100644 --- gcc/testsuite/g++.dg/concepts/req19.C +++ gcc/testsuite/g++.dg/concepts/req19.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct B { diff --git gcc/testsuite/g++.dg/concepts/req2.C gcc/testsuite/g++.dg/concepts/req2.C index 3f35ee8f0f5..b32845a96c9 100644 --- gcc/testsuite/g++.dg/concepts/req2.C +++ gcc/testsuite/g++.dg/concepts/req2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class () { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/req20.C gcc/testsuite/g++.dg/concepts/req20.C index 38ade560753..bd6b0f98390 100644 --- gcc/testsuite/g++.dg/concepts/req20.C +++ gcc/testsuite/g++.dg/concepts/req20.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool C = true; diff --git gcc/testsuite/g++.dg/concepts/req3.C gcc/testsuite/g++.dg/concepts/req3.C index 8322e71623b..8ce58e56ebf 100644 --- gcc/testsuite/g++.dg/concepts/req3.C +++ gcc/testsuite/g++.dg/concepts/req3.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Class () { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/req4.C gcc/testsuite/g++.dg/concepts/req4.C index b8c42093911..fcc13c6dcea 100644 --- gcc/testsuite/g++.dg/concepts/req4.C +++ gcc/testsuite/g++.dg/concepts/req4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct fool { constexpr fool operator&&(fool) const { return {}; } diff --git gcc/testsuite/g++.dg/concepts/req5.C gcc/testsuite/g++.dg/concepts/req5.C index a3a315c600b..7ad1cab9e93 100644 --- gcc/testsuite/g++.dg/concepts/req5.C +++ gcc/testsuite/g++.dg/concepts/req5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct fool { }; diff --git gcc/testsuite/g++.dg/concepts/req6.C gcc/testsuite/g++.dg/concepts/req6.C index 50fa3b4dadd..dd7dbdd9239 100644 --- gcc/testsuite/g++.dg/concepts/req6.C +++ gcc/testsuite/g++.dg/concepts/req6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct X { }; int operator==(X, X) { return 0; } diff --git gcc/testsuite/g++.dg/concepts/req7.C gcc/testsuite/g++.dg/concepts/req7.C index 38933e4cf09..a6cfb4bf56d 100644 --- gcc/testsuite/g++.dg/concepts/req7.C +++ gcc/testsuite/g++.dg/concepts/req7.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <vector> diff --git gcc/testsuite/g++.dg/concepts/req8.C gcc/testsuite/g++.dg/concepts/req8.C index 5a34358bbd5..201be37e9c7 100644 --- gcc/testsuite/g++.dg/concepts/req8.C +++ gcc/testsuite/g++.dg/concepts/req8.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check that type requirements are normalized correctly. diff --git gcc/testsuite/g++.dg/concepts/req9.C gcc/testsuite/g++.dg/concepts/req9.C index c4d6b57ab65..497154cd11f 100644 --- gcc/testsuite/g++.dg/concepts/req9.C +++ gcc/testsuite/g++.dg/concepts/req9.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> struct S1 {}; diff --git gcc/testsuite/g++.dg/concepts/template-parm1.C gcc/testsuite/g++.dg/concepts/template-parm1.C index 88731d6e249..192226f6ae2 100644 --- gcc/testsuite/g++.dg/concepts/template-parm1.C +++ gcc/testsuite/g++.dg/concepts/template-parm1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_same_as(T, int); diff --git gcc/testsuite/g++.dg/concepts/template-parm10.C gcc/testsuite/g++.dg/concepts/template-parm10.C index cbce4f3be6d..33bf372d646 100644 --- gcc/testsuite/g++.dg/concepts/template-parm10.C +++ gcc/testsuite/g++.dg/concepts/template-parm10.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<int N, class T> concept bool P() { return true; } diff --git gcc/testsuite/g++.dg/concepts/template-parm11.C gcc/testsuite/g++.dg/concepts/template-parm11.C index 352acc2271d..04e11e2e697 100644 --- gcc/testsuite/g++.dg/concepts/template-parm11.C +++ gcc/testsuite/g++.dg/concepts/template-parm11.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool NameProvider() diff --git gcc/testsuite/g++.dg/concepts/template-parm12.C gcc/testsuite/g++.dg/concepts/template-parm12.C index aee63dc9d2c..8745bb1d921 100644 --- gcc/testsuite/g++.dg/concepts/template-parm12.C +++ gcc/testsuite/g++.dg/concepts/template-parm12.C @@ -1,5 +1,6 @@ // Conceptized version of template/ttp23.C -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool Foo = true; diff --git gcc/testsuite/g++.dg/concepts/template-parm2.C gcc/testsuite/g++.dg/concepts/template-parm2.C index 6a32cfee885..adecc12f0f9 100644 --- gcc/testsuite/g++.dg/concepts/template-parm2.C +++ gcc/testsuite/g++.dg/concepts/template-parm2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_same_as(T, int); diff --git gcc/testsuite/g++.dg/concepts/template-parm3.C gcc/testsuite/g++.dg/concepts/template-parm3.C index 61fa86dc435..3d37e9c4c25 100644 --- gcc/testsuite/g++.dg/concepts/template-parm3.C +++ gcc/testsuite/g++.dg/concepts/template-parm3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_same_as(T, int); diff --git gcc/testsuite/g++.dg/concepts/template-parm4.C gcc/testsuite/g++.dg/concepts/template-parm4.C index c38404239f5..f546a758c06 100644 --- gcc/testsuite/g++.dg/concepts/template-parm4.C +++ gcc/testsuite/g++.dg/concepts/template-parm4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_same_as(T, int); diff --git gcc/testsuite/g++.dg/concepts/template-parm5.C gcc/testsuite/g++.dg/concepts/template-parm5.C index 5e537b048ba..cd93c60778a 100644 --- gcc/testsuite/g++.dg/concepts/template-parm5.C +++ gcc/testsuite/g++.dg/concepts/template-parm5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_same_as(T, int); diff --git gcc/testsuite/g++.dg/concepts/template-parm6.C gcc/testsuite/g++.dg/concepts/template-parm6.C index eb4bb1670b1..9efe4094f21 100644 --- gcc/testsuite/g++.dg/concepts/template-parm6.C +++ gcc/testsuite/g++.dg/concepts/template-parm6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename... Ts> struct are_same; diff --git gcc/testsuite/g++.dg/concepts/template-parm7.C gcc/testsuite/g++.dg/concepts/template-parm7.C index 27d19e97719..1dfa0d16ee5 100644 --- gcc/testsuite/g++.dg/concepts/template-parm7.C +++ gcc/testsuite/g++.dg/concepts/template-parm7.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename... Ts> struct are_same; diff --git gcc/testsuite/g++.dg/concepts/template-parm8.C gcc/testsuite/g++.dg/concepts/template-parm8.C index 63a12c47f69..63c45124222 100644 --- gcc/testsuite/g++.dg/concepts/template-parm8.C +++ gcc/testsuite/g++.dg/concepts/template-parm8.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/template-parm9.C gcc/testsuite/g++.dg/concepts/template-parm9.C index e34c606e3d6..64308cdd6e6 100644 --- gcc/testsuite/g++.dg/concepts/template-parm9.C +++ gcc/testsuite/g++.dg/concepts/template-parm9.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C() { return __is_class(T); } diff --git gcc/testsuite/g++.dg/concepts/template-template-parm1.C gcc/testsuite/g++.dg/concepts/template-template-parm1.C index e828db96a81..6c4dc2cec31 100644 --- gcc/testsuite/g++.dg/concepts/template-template-parm1.C +++ gcc/testsuite/g++.dg/concepts/template-template-parm1.C @@ -1,5 +1,6 @@ // PR c++/66937 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include <tuple> diff --git gcc/testsuite/g++.dg/concepts/traits1.C gcc/testsuite/g++.dg/concepts/traits1.C index b5a71856545..27610e25a54 100644 --- gcc/testsuite/g++.dg/concepts/traits1.C +++ gcc/testsuite/g++.dg/concepts/traits1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Nothrow_assignable() { return __has_nothrow_assign(T); } diff --git gcc/testsuite/g++.dg/concepts/traits2.C gcc/testsuite/g++.dg/concepts/traits2.C index 3383d26469d..71dcfd37e6a 100644 --- gcc/testsuite/g++.dg/concepts/traits2.C +++ gcc/testsuite/g++.dg/concepts/traits2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool Nothrow_assignable() { return __has_nothrow_assign(T); } diff --git gcc/testsuite/g++.dg/concepts/var-concept1.C gcc/testsuite/g++.dg/concepts/var-concept1.C index 1456c077b4a..90a88d83cc9 100644 --- gcc/testsuite/g++.dg/concepts/var-concept1.C +++ gcc/testsuite/g++.dg/concepts/var-concept1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_class(T); diff --git gcc/testsuite/g++.dg/concepts/var-concept2.C gcc/testsuite/g++.dg/concepts/var-concept2.C index c71e8a40a36..c16d3e4a57e 100644 --- gcc/testsuite/g++.dg/concepts/var-concept2.C +++ gcc/testsuite/g++.dg/concepts/var-concept2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_class(T); diff --git gcc/testsuite/g++.dg/concepts/var-concept3.C gcc/testsuite/g++.dg/concepts/var-concept3.C index d4f4f573205..f3d642b1a53 100644 --- gcc/testsuite/g++.dg/concepts/var-concept3.C +++ gcc/testsuite/g++.dg/concepts/var-concept3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T> concept bool C1 = __is_class(T); diff --git gcc/testsuite/g++.dg/concepts/var-concept4.C gcc/testsuite/g++.dg/concepts/var-concept4.C index 677deda08d8..3864c9db99c 100644 --- gcc/testsuite/g++.dg/concepts/var-concept4.C +++ gcc/testsuite/g++.dg/concepts/var-concept4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T, typename U> concept bool Same = __is_same_as(T, U); diff --git gcc/testsuite/g++.dg/concepts/var-concept5.C gcc/testsuite/g++.dg/concepts/var-concept5.C index 68c4a6f99d9..b1e9cb5379c 100644 --- gcc/testsuite/g++.dg/concepts/var-concept5.C +++ gcc/testsuite/g++.dg/concepts/var-concept5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename T1, typename T2> concept bool C1 = true; diff --git gcc/testsuite/g++.dg/concepts/var-concept6.C gcc/testsuite/g++.dg/concepts/var-concept6.C index 645e8cac966..8f5ac629538 100644 --- gcc/testsuite/g++.dg/concepts/var-concept6.C +++ gcc/testsuite/g++.dg/concepts/var-concept6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept int C = true; // { dg-error "bool" } diff --git gcc/testsuite/g++.dg/concepts/var-concept7.C gcc/testsuite/g++.dg/concepts/var-concept7.C index 0df4a498a0d..8371b373f64 100644 --- gcc/testsuite/g++.dg/concepts/var-concept7.C +++ gcc/testsuite/g++.dg/concepts/var-concept7.C @@ -1,5 +1,6 @@ // PR c++/85133 -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } template<typename> concept bool C; // { dg-error "no initializer" } diff --git gcc/testsuite/g++.dg/concepts/var-templ1.C gcc/testsuite/g++.dg/concepts/var-templ1.C index f24d76db2a9..b69d7d8d6a2 100644 --- gcc/testsuite/g++.dg/concepts/var-templ1.C +++ gcc/testsuite/g++.dg/concepts/var-templ1.C @@ -1,5 +1,6 @@ // PR c++/67117 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> requires false diff --git gcc/testsuite/g++.dg/concepts/var-templ2.C gcc/testsuite/g++.dg/concepts/var-templ2.C index 2e04ed64833..ffe5f1ffe05 100644 --- gcc/testsuite/g++.dg/concepts/var-templ2.C +++ gcc/testsuite/g++.dg/concepts/var-templ2.C @@ -1,5 +1,6 @@ // PR c++/67139 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> constexpr typename T::type::value_type _v = T::type::value; diff --git gcc/testsuite/g++.dg/concepts/var-templ3.C gcc/testsuite/g++.dg/concepts/var-templ3.C index 07468637900..22f07eef827 100644 --- gcc/testsuite/g++.dg/concepts/var-templ3.C +++ gcc/testsuite/g++.dg/concepts/var-templ3.C @@ -1,5 +1,6 @@ // PR c++/68666 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } struct A { template <class> diff --git gcc/testsuite/g++.dg/concepts/variadic1.C gcc/testsuite/g++.dg/concepts/variadic1.C index b1b5ba5bc44..4c0f437c32c 100644 --- gcc/testsuite/g++.dg/concepts/variadic1.C +++ gcc/testsuite/g++.dg/concepts/variadic1.C @@ -1,5 +1,6 @@ // PR c++/66712 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T, class...Args> concept bool _Constructible_ = diff --git gcc/testsuite/g++.dg/concepts/variadic2.C gcc/testsuite/g++.dg/concepts/variadic2.C index 2b64a62edef..4675d97ca18 100644 --- gcc/testsuite/g++.dg/concepts/variadic2.C +++ gcc/testsuite/g++.dg/concepts/variadic2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template <class T> concept bool Copyable = requires (T t) { T(t); }; template <class T> concept bool Constructable = requires { T(); }; diff --git gcc/testsuite/g++.dg/concepts/variadic4.C gcc/testsuite/g++.dg/concepts/variadic4.C index 48bdfeed548..e0f7903cac5 100644 --- gcc/testsuite/g++.dg/concepts/variadic4.C +++ gcc/testsuite/g++.dg/concepts/variadic4.C @@ -1,5 +1,6 @@ // PR c++/73456 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template<typename...> struct list {}; diff --git gcc/testsuite/g++.dg/cpp1z/Wpessimizing-move1.C gcc/testsuite/g++.dg/cpp1z/Wpessimizing-move1.C index 59741889707..9dec587cb0f 100644 --- gcc/testsuite/g++.dg/cpp1z/Wpessimizing-move1.C +++ gcc/testsuite/g++.dg/cpp1z/Wpessimizing-move1.C @@ -1,5 +1,6 @@ // PR c++/86981 -// { dg-options "-Wpessimizing-move -std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wpessimizing-move" } #include <utility> #include <optional> diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base1.C gcc/testsuite/g++.dg/cpp1z/aggr-base1.C index 2c6bdcafb0c..40353f480e2 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base1.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base1.C @@ -1,5 +1,4 @@ -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } struct base1 { int b1, b2 = 42; }; struct base2 { diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base2.C gcc/testsuite/g++.dg/cpp1z/aggr-base2.C index 5d73bbf6739..855bed9d7b9 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base2.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base2.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct derived; struct base { diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base3.C gcc/testsuite/g++.dg/cpp1z/aggr-base3.C index f526a6e8812..c051c086488 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base3.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base3.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct derived; struct base { }; diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base4.C gcc/testsuite/g++.dg/cpp1z/aggr-base4.C index 8f9126bc23f..7a4865a1dd0 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base4.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base4.C @@ -1,5 +1,4 @@ -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } struct derived; struct base { }; diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base5.C gcc/testsuite/g++.dg/cpp1z/aggr-base5.C index 5f6d9ad8beb..17882b7be59 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base5.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base5.C @@ -1,5 +1,5 @@ -// { dg-options "-std=c++17 -w" } -// { dg-do run } +// { dg-options "-w" } +// { dg-do run { target c++17 } } struct A { }; struct B: A { int i; }; diff --git gcc/testsuite/g++.dg/cpp1z/aggr-base6.C gcc/testsuite/g++.dg/cpp1z/aggr-base6.C index 08578ed0b0b..3de2e722f7d 100644 --- gcc/testsuite/g++.dg/cpp1z/aggr-base6.C +++ gcc/testsuite/g++.dg/cpp1z/aggr-base6.C @@ -1,5 +1,5 @@ -// { dg-options "-std=c++17 -w" } -// { dg-do run } +// { dg-options "-w" } +// { dg-do run { target c++17 } } struct A { }; struct B: A { int i; }; diff --git gcc/testsuite/g++.dg/cpp1z/aligned-new1.C gcc/testsuite/g++.dg/cpp1z/aligned-new1.C index 09f823e1cef..48e9e945766 100644 --- gcc/testsuite/g++.dg/cpp1z/aligned-new1.C +++ gcc/testsuite/g++.dg/cpp1z/aligned-new1.C @@ -1,5 +1,4 @@ -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } #ifndef __STDCPP_DEFAULT_NEW_ALIGNMENT__ #error __STDCPP_DEFAULT_NEW_ALIGNMENT__ not defined diff --git gcc/testsuite/g++.dg/cpp1z/aligned-new2.C gcc/testsuite/g++.dg/cpp1z/aligned-new2.C index 7bf63091614..5c1c4eb09de 100644 --- gcc/testsuite/g++.dg/cpp1z/aligned-new2.C +++ gcc/testsuite/g++.dg/cpp1z/aligned-new2.C @@ -1,5 +1,4 @@ -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } #include <new> diff --git gcc/testsuite/g++.dg/cpp1z/aligned-new3.C gcc/testsuite/g++.dg/cpp1z/aligned-new3.C index 2bfb6b8d519..08cd732ac7b 100644 --- gcc/testsuite/g++.dg/cpp1z/aligned-new3.C +++ gcc/testsuite/g++.dg/cpp1z/aligned-new3.C @@ -1,5 +1,4 @@ -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } #include <new> diff --git gcc/testsuite/g++.dg/cpp1z/aligned-new7.C gcc/testsuite/g++.dg/cpp1z/aligned-new7.C index 52011f254ff..5b364d69662 100644 --- gcc/testsuite/g++.dg/cpp1z/aligned-new7.C +++ gcc/testsuite/g++.dg/cpp1z/aligned-new7.C @@ -1,5 +1,6 @@ // PR c++/77742 -// { dg-options "-Wall -std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wall" } #include <new> diff --git gcc/testsuite/g++.dg/cpp1z/aligned-new8.C gcc/testsuite/g++.dg/cpp1z/aligned-new8.C index 11dd45722b7..9c125204d63 100644 --- gcc/testsuite/g++.dg/cpp1z/aligned-new8.C +++ gcc/testsuite/g++.dg/cpp1z/aligned-new8.C @@ -1,6 +1,5 @@ // PR c++/82760 -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } #include <new> #include <cstddef> diff --git gcc/testsuite/g++.dg/cpp1z/attributes-enum-1.C gcc/testsuite/g++.dg/cpp1z/attributes-enum-1.C index ad7d2374897..1e9e996568c 100644 --- gcc/testsuite/g++.dg/cpp1z/attributes-enum-1.C +++ gcc/testsuite/g++.dg/cpp1z/attributes-enum-1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } #ifndef __cpp_enumerator_attributes #error __cpp_enumerator_attributes not defined diff --git gcc/testsuite/g++.dg/cpp1z/bool-increment1.C gcc/testsuite/g++.dg/cpp1z/bool-increment1.C index 236fba33fed..0355dc879a6 100644 --- gcc/testsuite/g++.dg/cpp1z/bool-increment1.C +++ gcc/testsuite/g++.dg/cpp1z/bool-increment1.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int fn (bool b) diff --git gcc/testsuite/g++.dg/cpp1z/byte1.C gcc/testsuite/g++.dg/cpp1z/byte1.C index d3b9b8818fc..631b18d126c 100644 --- gcc/testsuite/g++.dg/cpp1z/byte1.C +++ gcc/testsuite/g++.dg/cpp1z/byte1.C @@ -1,5 +1,6 @@ // Test for std::byte aliasing properties. -// { dg-options "-std=c++17 -O3" } +// { dg-do compile { target c++17 } } +// { dg-options "-O3" } #include <cstddef> diff --git gcc/testsuite/g++.dg/cpp1z/byte2.C gcc/testsuite/g++.dg/cpp1z/byte2.C index 6a395c15530..717aea85c5c 100644 --- gcc/testsuite/g++.dg/cpp1z/byte2.C +++ gcc/testsuite/g++.dg/cpp1z/byte2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -Wall" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wall" } #include <cstddef> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction1.C gcc/testsuite/g++.dg/cpp1z/class-deduction1.C index 7e1588e7475..752b430181d 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction1.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction1.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction10.C gcc/testsuite/g++.dg/cpp1z/class-deduction10.C index a3879fcde97..eb0b15ee149 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction10.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction10.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction11.C gcc/testsuite/g++.dg/cpp1z/class-deduction11.C index 301ba9acffa..2a7594918e5 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction11.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction11.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction12.C gcc/testsuite/g++.dg/cpp1z/class-deduction12.C index e858dcf8da1..a31cc1526db 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction12.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction12.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction13.C gcc/testsuite/g++.dg/cpp1z/class-deduction13.C index 0bacf9b304e..7a07befc474 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction13.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction13.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction14.C gcc/testsuite/g++.dg/cpp1z/class-deduction14.C index 41d58db18ba..ba2ba9bd1ec 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction14.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction14.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <vector> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction15.C gcc/testsuite/g++.dg/cpp1z/class-deduction15.C index 3f0e2290441..5d050f13e30 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction15.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction15.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <utility> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction16.C gcc/testsuite/g++.dg/cpp1z/class-deduction16.C index 2a636e2f70e..3db8a0238c1 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction16.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction16.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <tuple> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction17.C gcc/testsuite/g++.dg/cpp1z/class-deduction17.C index 646b5aac882..e8d1ab22e36 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction17.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction17.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <initializer_list> template <class T> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction18.C gcc/testsuite/g++.dg/cpp1z/class-deduction18.C index 42f936aa5cc..a0e6a73f197 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction18.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction18.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class T> struct S{S(T){}}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction19.C gcc/testsuite/g++.dg/cpp1z/class-deduction19.C index 5c21b74ca38..a098e1472dd 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction19.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction19.C @@ -1,5 +1,5 @@ // PR c++/77912 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class T> struct S{S(T){}}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction2.C gcc/testsuite/g++.dg/cpp1z/class-deduction2.C index 2e1d115c58d..a0cd20ce2fa 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction2.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction2.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction20.C gcc/testsuite/g++.dg/cpp1z/class-deduction20.C index 988f11bcc62..4c009e70140 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction20.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction20.C @@ -1,5 +1,5 @@ // PR c++/77890 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class F> struct S{S(F&&f){}}; void f() diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction21.C gcc/testsuite/g++.dg/cpp1z/class-deduction21.C index 2c2ce467efa..e8cd5621a09 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction21.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction21.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class T, class D = int> struct S { T t; }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction22.C gcc/testsuite/g++.dg/cpp1z/class-deduction22.C index a1f0c203750..0a260850be0 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction22.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction22.C @@ -1,10 +1,10 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <template <class> class T> void f() { T t = 42; // { dg-error "B" } -}; +} template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction23.C gcc/testsuite/g++.dg/cpp1z/class-deduction23.C index a2fa4061621..a383304667d 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction23.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction23.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction24.C gcc/testsuite/g++.dg/cpp1z/class-deduction24.C index c4d890c1a83..1d05a0867ff 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction24.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction24.C @@ -1,5 +1,5 @@ // PR c++/78894 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction25.C gcc/testsuite/g++.dg/cpp1z/class-deduction25.C index d3259d88f14..2d8c3ef4651 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction25.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction25.C @@ -1,5 +1,5 @@ // Testcase from P0512R0 for C++17 NB comment US 19 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename> struct remove_ref; template<typename _Tp> struct remove_ref { typedef _Tp type; }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction26.C gcc/testsuite/g++.dg/cpp1z/class-deduction26.C index 74de70ce21f..bfdba796d0a 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction26.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction26.C @@ -1,5 +1,5 @@ // Testcase from P0512R0 for C++17 NB comment US 20 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class,class> struct same; template <class T> struct same<T,T> {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction27.C gcc/testsuite/g++.dg/cpp1z/class-deduction27.C index ce58058b178..a9a9d8c0c3c 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction27.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction27.C @@ -1,5 +1,5 @@ // PR c++/79316 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename T> struct S { S(T t) {} }; template<typename T> S(T, int = 7) -> S<T>; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction28.C gcc/testsuite/g++.dg/cpp1z/class-deduction28.C index 8238e5bc25e..2fec7f79bac 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction28.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction28.C @@ -1,5 +1,5 @@ // PR c++/79350 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction29.C gcc/testsuite/g++.dg/cpp1z/class-deduction29.C index 8c2d67ef4b4..6c247169621 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction29.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction29.C @@ -1,5 +1,5 @@ // PR c++/79500 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename T> struct A {}; A(...) -> A<int>; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction3.C gcc/testsuite/g++.dg/cpp1z/class-deduction3.C index 13e001afd6b..9b327835f38 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction3.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction3.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int I> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction30.C gcc/testsuite/g++.dg/cpp1z/class-deduction30.C index d0ef5f9e060..4339a5e08c5 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction30.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction30.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T = void> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction31.C gcc/testsuite/g++.dg/cpp1z/class-deduction31.C index 2fd2f28fad8..67243b2f800 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction31.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction31.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A { A(T); // #1 diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction32.C gcc/testsuite/g++.dg/cpp1z/class-deduction32.C index 0f4c85ad35f..ef21c9620ac 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction32.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction32.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <initializer_list> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction33.C gcc/testsuite/g++.dg/cpp1z/class-deduction33.C index ee9d780aaea..4572b0a2265 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction33.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction33.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class,class> struct same; template <class T> struct same<T,T> {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction34.C gcc/testsuite/g++.dg/cpp1z/class-deduction34.C index 380c35fdb03..26c063a9e72 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction34.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction34.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction35.C gcc/testsuite/g++.dg/cpp1z/class-deduction35.C index 63d099dc1fd..b63cf8209da 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction35.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction35.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction36.C gcc/testsuite/g++.dg/cpp1z/class-deduction36.C index 3670ceea03a..a9c95fe9fc4 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction36.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction36.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A { A(T&); diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction38.C gcc/testsuite/g++.dg/cpp1z/class-deduction38.C index 883961e04c7..64c276aecae 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction38.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction38.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A { using value_type = T; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction39.C gcc/testsuite/g++.dg/cpp1z/class-deduction39.C index f141e9bedfb..772434aee71 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction39.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction39.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction4.C gcc/testsuite/g++.dg/cpp1z/class-deduction4.C index a86589cf228..391beee8d8f 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction4.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction4.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int I, int J> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction40.C gcc/testsuite/g++.dg/cpp1z/class-deduction40.C index 3888b3992e2..4420277479a 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction40.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction40.C @@ -1,5 +1,5 @@ // PR c++/81180 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template < int I > struct int_{}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction41.C gcc/testsuite/g++.dg/cpp1z/class-deduction41.C index f287ce925c9..5557ae99161 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction41.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction41.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <initializer_list> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction42.C gcc/testsuite/g++.dg/cpp1z/class-deduction42.C index 4623e742fb8..dfba8266da6 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction42.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction42.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <initializer_list> diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction43.C gcc/testsuite/g++.dg/cpp1z/class-deduction43.C index 120145516b1..55a79b327f4 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction43.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction43.C @@ -1,5 +1,5 @@ // PR c++/79790 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int N> struct array diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction44.C gcc/testsuite/g++.dg/cpp1z/class-deduction44.C index 15711971f51..225652cd2e4 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction44.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction44.C @@ -1,5 +1,5 @@ // PR c++/80412 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename> struct A; template <typename> struct B : A < B { , // { dg-error "" } diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction45.C gcc/testsuite/g++.dg/cpp1z/class-deduction45.C index 3fe8dd33b79..6f72b5f15ae 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction45.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction45.C @@ -1,5 +1,5 @@ // PR c++/82308 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename, unsigned> struct array {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction46.C gcc/testsuite/g++.dg/cpp1z/class-deduction46.C index cf38ed65fa8..513e16057af 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction46.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction46.C @@ -1,5 +1,5 @@ // PR c++/80449 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class S> struct C; template<> struct C<int> { C(int, int) {} }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction48.C gcc/testsuite/g++.dg/cpp1z/class-deduction48.C index 1cfdc44a993..ab64cc4a0a6 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction48.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction48.C @@ -1,5 +1,5 @@ // PR c++/82468 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <template <class> class TT> TT(double) -> TT<int>; // { dg-error "template template" } diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction49.C gcc/testsuite/g++.dg/cpp1z/class-deduction49.C index 086f12ad3c6..658ae43e700 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction49.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction49.C @@ -1,5 +1,5 @@ // PR c++/84015 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int I> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction5.C gcc/testsuite/g++.dg/cpp1z/class-deduction5.C index a7d56fbf93d..49d4c948aff 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction5.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction5.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction50.C gcc/testsuite/g++.dg/cpp1z/class-deduction50.C index e8cdd8c710f..7289932c486 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction50.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction50.C @@ -1,5 +1,5 @@ // PR c++/84355 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class, class> struct same; template <class T> struct same<T,T> {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction51.C gcc/testsuite/g++.dg/cpp1z/class-deduction51.C index eba7972c3c6..ef593ff614b 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction51.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction51.C @@ -1,5 +1,5 @@ // PR c++/84937 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template<int, int> struct A {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction52.C gcc/testsuite/g++.dg/cpp1z/class-deduction52.C index db786ce7d62..6ea9e8087d6 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction52.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction52.C @@ -1,5 +1,5 @@ // PR c++/84768 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename> struct A {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction54.C gcc/testsuite/g++.dg/cpp1z/class-deduction54.C index e51398bbbb0..2e87139b4d8 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction54.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction54.C @@ -1,5 +1,5 @@ // PR c++/82152 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } struct Base {}; diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction55.C gcc/testsuite/g++.dg/cpp1z/class-deduction55.C index a93d7203681..74fd29f66dc 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction55.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction55.C @@ -1,5 +1,5 @@ // PR c++/85883 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T> struct Bar diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction56.C gcc/testsuite/g++.dg/cpp1z/class-deduction56.C index 71dbfa1904d..6cf54b31e2d 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction56.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction56.C @@ -1,5 +1,5 @@ // PR c++/85883 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T1, typename T2> struct Bar diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction57.C gcc/testsuite/g++.dg/cpp1z/class-deduction57.C index 200ba6c3536..f1c776ec70d 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction57.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction57.C @@ -1,5 +1,5 @@ // PR c++/85883 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T1, typename T2, typename T3> struct Bar diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction58.C gcc/testsuite/g++.dg/cpp1z/class-deduction58.C index 82c3f83710f..0613a9e9a7b 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction58.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction58.C @@ -1,5 +1,5 @@ // PR c++/86098 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class _Res> class future; template <class T> T&& declval(); diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction6.C gcc/testsuite/g++.dg/cpp1z/class-deduction6.C index 3f751cee3e2..b20bd75b98d 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction6.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction6.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction7.C gcc/testsuite/g++.dg/cpp1z/class-deduction7.C index d635a642bfb..ab96774d5e9 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction7.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction7.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction8.C gcc/testsuite/g++.dg/cpp1z/class-deduction8.C index 9836e26d8bb..20cabe00a74 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction8.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction8.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/class-deduction9.C gcc/testsuite/g++.dg/cpp1z/class-deduction9.C index 23c58fd2026..c0af9447e7b 100644 --- gcc/testsuite/g++.dg/cpp1z/class-deduction9.C +++ gcc/testsuite/g++.dg/cpp1z/class-deduction9.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } namespace N { template <class T> diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-83692.C gcc/testsuite/g++.dg/cpp1z/constexpr-83692.C index f6b61eeab85..3c6592c2dde 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-83692.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-83692.C @@ -1,5 +1,5 @@ // PR c++/83692 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct integer { constexpr int value() const { return m_value; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C index 0e7912d4067..43dcf714502 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-84684.C @@ -1,5 +1,5 @@ // PR c++/84684 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } typedef decltype (sizeof (0)) size_t; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C index f10d8300888..84d7b20b10a 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C @@ -1,5 +1,5 @@ // PR c++/78948 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int T> void sizeof_mismatch() diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C index aaef952400b..56922bb19ea 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C @@ -1,6 +1,6 @@ // Test that discarded statements differ from unevaluated operands in some // ways. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { int i; }; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if12.C gcc/testsuite/g++.dg/cpp1z/constexpr-if12.C index db984a64677..f21a9896ff2 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if12.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if12.C @@ -1,5 +1,5 @@ // PR c++/80562 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct T { constexpr auto foo() { return false; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C index 55dbfd902ee..459fa132d63 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C @@ -1,5 +1,5 @@ // PR c++/83273 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int main() { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if14.C gcc/testsuite/g++.dg/cpp1z/constexpr-if14.C index f6cc39a0c2f..69af7753116 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if14.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if14.C @@ -1,5 +1,5 @@ // PR c++/84421 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A{ constexpr operator bool() const { return true; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C index 9a9053c3305..1dd8beab89c 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C @@ -1,5 +1,5 @@ // PR c++/84854 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } constexpr int foo () { return 1; } constexpr int foo (int) { return 2; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if16.C gcc/testsuite/g++.dg/cpp1z/constexpr-if16.C index 31a149702fd..dfece047ca2 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if16.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if16.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if17.C gcc/testsuite/g++.dg/cpp1z/constexpr-if17.C index c6ebf1ebab2..cf637f6c3d7 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if17.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if17.C @@ -1,6 +1,5 @@ // PR c++/85149 -// { dg-do run } -// { dg-additional-options -std=c++17 } +// { dg-do run { target c++17 } } template <typename T> struct is_void { static constexpr bool value = false; }; template <> struct is_void<void> { static constexpr bool value = true; }; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if18.C gcc/testsuite/g++.dg/cpp1z/constexpr-if18.C index 03ad620e8d9..a5601176be1 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if18.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if18.C @@ -1,5 +1,5 @@ // PR c++/85200 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T> void f(){ diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if19.C gcc/testsuite/g++.dg/cpp1z/constexpr-if19.C index 40016a5b7e1..a1eaf320221 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if19.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if19.C @@ -1,5 +1,5 @@ // PR c++/85200 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A{ constexpr operator int(){ return 0; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C index 24343adb748..2fd678bb383 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C @@ -1,5 +1,5 @@ // PR c++/85214 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } struct g { constexpr operator int() { return true; } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if21.C gcc/testsuite/g++.dg/cpp1z/constexpr-if21.C index 56e108be4ad..b02417fd34e 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if21.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if21.C @@ -1,5 +1,5 @@ // PR c++/85032 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if22.C gcc/testsuite/g++.dg/cpp1z/constexpr-if22.C index 76f0c73476b..32ed5df8b4e 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if22.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if22.C @@ -1,5 +1,5 @@ // PR c++/85695 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T, T v> struct integral_constant { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if23.C gcc/testsuite/g++.dg/cpp1z/constexpr-if23.C index 8e31db3e863..4f6cf3d5490 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if23.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if23.C @@ -1,5 +1,5 @@ // PR c++/85842 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class T> auto f = [](auto&& arg) -> T* { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-if24.C gcc/testsuite/g++.dg/cpp1z/constexpr-if24.C index cbdb38d95c3..8e6034c4dfc 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-if24.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if24.C @@ -1,5 +1,5 @@ // PR c++/86480 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class...> constexpr bool val = true; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda1.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda1.C index 501e7d32cd7..a2250a2e845 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda1.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda1.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } constexpr auto Add5 = [](int i) { return i+5; }; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda10.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda10.C index 2af652d0a06..d13053a9c4e 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda10.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda10.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void g() { const int n = 0; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda11.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda11.C index f5d58ce9429..98b27c1d06b 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda11.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda11.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } // 'v' & 'm' are odr-used but do not occur in a constant-expression within the nested // lambda, so are well-formed. diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda12.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda12.C index 1ad2f6859f8..a59bf497b30 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda12.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda12.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void f(int i) { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda13.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda13.C index 35baff35ded..962ec8db62c 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda13.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda13.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto l1 = []() constexpr constexpr { }; // { dg-error "duplicate" } auto l2 = []() mutable mutable { }; // { dg-error "duplicate" } diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda17.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda17.C index 44bd2b83f94..89585f3a395 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda17.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda17.C @@ -1,5 +1,5 @@ // PR c++/78131 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename TF> constexpr auto f(TF) diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda18.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda18.C index 639018ba945..c7ef8d0752e 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda18.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda18.C @@ -1,5 +1,5 @@ // PR c++/82570 -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } template< typename Body > inline void iterate(Body body) diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda19.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda19.C index a16d31c59eb..c6266c2bfbb 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda19.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda19.C @@ -1,5 +1,5 @@ // PR c++/84098 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A{}; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda2.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda2.C index a6b3e532649..3cf9d03e741 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda2.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda2.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } constexpr int AddEleven(int n){ return[n]{return n+11;}(); diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C index c5109b85de3..d2d220c2d6c 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda20.C @@ -1,5 +1,5 @@ // PR c++/82022 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> void f2() diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda21.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda21.C index 8b0c95b37f3..210726b8277 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda21.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda21.C @@ -1,5 +1,5 @@ // PR c++/85228 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template<int> struct A { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda3.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda3.C index b2772b3fd67..ccdf6977082 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda3.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda3.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } constexpr auto add = [] (int n, int m) { auto L = [=] { return n; }; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda4.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda4.C index 106b50441e9..83a2029fdb3 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda4.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda4.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto ID = [] (int n) constexpr { return n; }; constexpr int I = ID(3); diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda5.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda5.C index 8c9db952f24..c9fa63d1bf5 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda5.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda5.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto addOne = [] (int n) { return n + 1; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda6.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda6.C index cd7c5b9f3ef..214d3821299 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda6.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda6.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto monoid = [](auto v) { return [=] { return v; }; }; auto add = [](auto m1) constexpr { diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C index 4dc5ae2382b..474ce88f81f 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda7.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto ID = [](auto a) { return a; }; static_assert( ID (3) == 3); // OK diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda8.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda8.C index 0bac4c1ea35..84be68ab7f0 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda8.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda8.C @@ -1,5 +1,5 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } auto Fwd = [](int (*fp)(int), auto a) { return fp(a); }; auto C = [](auto a) { return a; }; diff --git gcc/testsuite/g++.dg/cpp1z/constexpr-lambda9.C gcc/testsuite/g++.dg/cpp1z/constexpr-lambda9.C index 23fdc9390aa..c4999c59acc 100644 --- gcc/testsuite/g++.dg/cpp1z/constexpr-lambda9.C +++ gcc/testsuite/g++.dg/cpp1z/constexpr-lambda9.C @@ -1,4 +1,4 @@ // Testcase from P0170R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } static_assert([](int n) { return [&n] { return ++n; }(); }(3) == 4); diff --git gcc/testsuite/g++.dg/cpp1z/cplusplus.C gcc/testsuite/g++.dg/cpp1z/cplusplus.C index bc6139b2e86..cc27e1e8036 100644 --- gcc/testsuite/g++.dg/cpp1z/cplusplus.C +++ gcc/testsuite/g++.dg/cpp1z/cplusplus.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17_only } } #if __cplusplus != 201703L #error "__cplusplus != 201703L" diff --git gcc/testsuite/g++.dg/cpp1z/decomp-bitfield1.C gcc/testsuite/g++.dg/cpp1z/decomp-bitfield1.C index 1833bc3cda8..1a14997a76f 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp-bitfield1.C +++ gcc/testsuite/g++.dg/cpp1z/decomp-bitfield1.C @@ -1,5 +1,5 @@ // Test of bit-fields. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { long i: 2; } a; diff --git gcc/testsuite/g++.dg/cpp1z/decomp-constexpr1.C gcc/testsuite/g++.dg/cpp1z/decomp-constexpr1.C index 04ca9a128a4..1a5374158d1 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp-constexpr1.C +++ gcc/testsuite/g++.dg/cpp1z/decomp-constexpr1.C @@ -1,5 +1,5 @@ // Test for reference address comparison in constant expression. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int i[2]; struct A { int i, j; } a; diff --git gcc/testsuite/g++.dg/cpp1z/decomp-lambda1.C gcc/testsuite/g++.dg/cpp1z/decomp-lambda1.C index fbab0259643..6161e4da23e 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp-lambda1.C +++ gcc/testsuite/g++.dg/cpp1z/decomp-lambda1.C @@ -1,5 +1,5 @@ // PR c++/84420 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } int main(){ int a[1]{}; diff --git gcc/testsuite/g++.dg/cpp1z/decomp10.C gcc/testsuite/g++.dg/cpp1z/decomp10.C index b4169d34320..f0723f8d85f 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp10.C +++ gcc/testsuite/g++.dg/cpp1z/decomp10.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } namespace std { template<typename T> struct tuple_size; diff --git gcc/testsuite/g++.dg/cpp1z/decomp11.C gcc/testsuite/g++.dg/cpp1z/decomp11.C index edb6709116c..38dfb366dd9 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp11.C +++ gcc/testsuite/g++.dg/cpp1z/decomp11.C @@ -1,5 +1,5 @@ // Test for decltype of direct decomposition. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class,class> struct same_type; template <class T> struct same_type<T,T> {}; diff --git gcc/testsuite/g++.dg/cpp1z/decomp12.C gcc/testsuite/g++.dg/cpp1z/decomp12.C index 09ed6461d3c..56fd4987165 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp12.C +++ gcc/testsuite/g++.dg/cpp1z/decomp12.C @@ -1,6 +1,5 @@ // PR c++/78358 -// { dg-do run } -// { dg-options -std=c++17 } +// { dg-do run { target c++17 } } #include <tuple> diff --git gcc/testsuite/g++.dg/cpp1z/decomp15.C gcc/testsuite/g++.dg/cpp1z/decomp15.C index e5dc443598e..72e2c52f5c6 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp15.C +++ gcc/testsuite/g++.dg/cpp1z/decomp15.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } struct A { bool a, b; }; struct B { int a, b; }; diff --git gcc/testsuite/g++.dg/cpp1z/decomp16.C gcc/testsuite/g++.dg/cpp1z/decomp16.C index 7589c8015a5..fe0be16e167 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp16.C +++ gcc/testsuite/g++.dg/cpp1z/decomp16.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } struct A { bool a, b; }; struct B { int a, b; }; diff --git gcc/testsuite/g++.dg/cpp1z/decomp17.C gcc/testsuite/g++.dg/cpp1z/decomp17.C index ace1f06a5a7..73dbebea896 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp17.C +++ gcc/testsuite/g++.dg/cpp1z/decomp17.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <tuple> diff --git gcc/testsuite/g++.dg/cpp1z/decomp20.C gcc/testsuite/g++.dg/cpp1z/decomp20.C index 8475e5d9707..8309ce8896c 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp20.C +++ gcc/testsuite/g++.dg/cpp1z/decomp20.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { int i,j; }; diff --git gcc/testsuite/g++.dg/cpp1z/decomp21.C gcc/testsuite/g++.dg/cpp1z/decomp21.C index 6f21c9c9ec2..9ed0da3de3e 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp21.C +++ gcc/testsuite/g++.dg/cpp1z/decomp21.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int a[3]; struct S { int b, c, d; } s; diff --git gcc/testsuite/g++.dg/cpp1z/decomp27.C gcc/testsuite/g++.dg/cpp1z/decomp27.C index fd5f30e05a5..a28f500c038 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp27.C +++ gcc/testsuite/g++.dg/cpp1z/decomp27.C @@ -1,6 +1,5 @@ // PR c++/80084 -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/decomp29.C gcc/testsuite/g++.dg/cpp1z/decomp29.C index 3ccc3839580..3404a58f225 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp29.C +++ gcc/testsuite/g++.dg/cpp1z/decomp29.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -Wunused" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wunused" } #include <tuple> diff --git gcc/testsuite/g++.dg/cpp1z/decomp30.C gcc/testsuite/g++.dg/cpp1z/decomp30.C index b11a3127777..9de3979edce 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp30.C +++ gcc/testsuite/g++.dg/cpp1z/decomp30.C @@ -1,5 +1,5 @@ // PR c++/81258 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int a[2]; auto [b, c] (a); diff --git gcc/testsuite/g++.dg/cpp1z/decomp37.C gcc/testsuite/g++.dg/cpp1z/decomp37.C index dc47908cddf..6bf81769b7e 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp37.C +++ gcc/testsuite/g++.dg/cpp1z/decomp37.C @@ -1,5 +1,4 @@ -// { dg-additional-options -std=c++17 } -// { dg-do compile } +// { dg-do compile { target c++17 } } #include <memory> #include <tuple> diff --git gcc/testsuite/g++.dg/cpp1z/decomp38.C gcc/testsuite/g++.dg/cpp1z/decomp38.C index fc69c02e4d3..769318e8976 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp38.C +++ gcc/testsuite/g++.dg/cpp1z/decomp38.C @@ -1,5 +1,4 @@ -// { dg-additional-options -std=c++17 } -// { dg-do compile } +// { dg-do compile { target c++17 } } class X { diff --git gcc/testsuite/g++.dg/cpp1z/decomp9.C gcc/testsuite/g++.dg/cpp1z/decomp9.C index 0a19876471d..845635a2994 100644 --- gcc/testsuite/g++.dg/cpp1z/decomp9.C +++ gcc/testsuite/g++.dg/cpp1z/decomp9.C @@ -1,5 +1,4 @@ -// { dg-do run } -// { dg-options -std=c++17 } +// { dg-do run { target c++17 } } #define assert(X) do { if (!(X)) __builtin_abort(); } while (0) diff --git gcc/testsuite/g++.dg/cpp1z/elide1.C gcc/testsuite/g++.dg/cpp1z/elide1.C index 6875c82561b..7b35b9e0391 100644 --- gcc/testsuite/g++.dg/cpp1z/elide1.C +++ gcc/testsuite/g++.dg/cpp1z/elide1.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/eval-order2.C gcc/testsuite/g++.dg/cpp1z/eval-order2.C index 95dd10648f6..af26cb20744 100644 --- gcc/testsuite/g++.dg/cpp1z/eval-order2.C +++ gcc/testsuite/g++.dg/cpp1z/eval-order2.C @@ -1,6 +1,5 @@ // P0145R2: Refining Expression Order for C++ -// { dg-do run } -// { dg-options "-std=c++17" } +// { dg-do run { target c++17 } } #include <string> #define assert(X) if (!(X)) __builtin_abort(); diff --git gcc/testsuite/g++.dg/cpp1z/eval-order3.C gcc/testsuite/g++.dg/cpp1z/eval-order3.C index b53e96a9f8f..5773591d49f 100644 --- gcc/testsuite/g++.dg/cpp1z/eval-order3.C +++ gcc/testsuite/g++.dg/cpp1z/eval-order3.C @@ -1,6 +1,5 @@ // P0145R2: Refining Expression Order for C++ -// { dg-do run } -// { dg-options "-std=c++17" } +// { dg-do run { target c++17 } } extern "C" int printf (const char *, ...); void sink(...) { } diff --git gcc/testsuite/g++.dg/cpp1z/fallthrough1.C gcc/testsuite/g++.dg/cpp1z/fallthrough1.C index 54a8323dfac..c6f54ce06d7 100644 --- gcc/testsuite/g++.dg/cpp1z/fallthrough1.C +++ gcc/testsuite/g++.dg/cpp1z/fallthrough1.C @@ -1,6 +1,6 @@ // PR c/7652 -// { dg-do compile } -// { dg-options "-std=c++17 -Wextra -Wall -Wpedantic" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wextra -Wall -Wpedantic" } // Check that we accept attribute [[fallthrough]]. diff --git gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index e90b74440ac..f551892a045 100644 --- gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" } +// { dg-do compile { target c++17 } } +// { dg-options "-I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" } // C++98 features: diff --git gcc/testsuite/g++.dg/cpp1z/fold-ice1.C gcc/testsuite/g++.dg/cpp1z/fold-ice1.C index 7e71cc9dd21..e65730bce26 100644 --- gcc/testsuite/g++.dg/cpp1z/fold-ice1.C +++ gcc/testsuite/g++.dg/cpp1z/fold-ice1.C @@ -1,5 +1,5 @@ // PR c++/67926 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <bool ... T> bool FUR = (T && ...); template <bool ... T> bool FUL = (... && T); diff --git gcc/testsuite/g++.dg/cpp1z/fold-lambda.C gcc/testsuite/g++.dg/cpp1z/fold-lambda.C index 5eaed4a0156..8ccf42bedb3 100644 --- gcc/testsuite/g++.dg/cpp1z/fold-lambda.C +++ gcc/testsuite/g++.dg/cpp1z/fold-lambda.C @@ -1,5 +1,4 @@ -// { dg-do run } -// { dg-options -std=c++17 } +// { dg-do run { target c++17 } } template <class... T> auto f() { diff --git gcc/testsuite/g++.dg/cpp1z/fold-lambda2.C gcc/testsuite/g++.dg/cpp1z/fold-lambda2.C index e93f55f7fd8..14ca95457da 100644 --- gcc/testsuite/g++.dg/cpp1z/fold-lambda2.C +++ gcc/testsuite/g++.dg/cpp1z/fold-lambda2.C @@ -1,5 +1,5 @@ // PR c++/85305 -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <int... Is> void foo() diff --git gcc/testsuite/g++.dg/cpp1z/fold-mangle.C gcc/testsuite/g++.dg/cpp1z/fold-mangle.C index 95df8ca494d..6957d9c37c9 100644 --- gcc/testsuite/g++.dg/cpp1z/fold-mangle.C +++ gcc/testsuite/g++.dg/cpp1z/fold-mangle.C @@ -1,5 +1,5 @@ // PR c++/71711 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template < int > struct A {}; template < int ... N > void unary_left (A < (... + N) >); diff --git gcc/testsuite/g++.dg/cpp1z/fold1.C gcc/testsuite/g++.dg/cpp1z/fold1.C index fdaa9559699..6d004676707 100644 --- gcc/testsuite/g++.dg/cpp1z/fold1.C +++ gcc/testsuite/g++.dg/cpp1z/fold1.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17" } +// { dg-do run { target c++17 } } +// { dg-options "" } #include <cassert> diff --git gcc/testsuite/g++.dg/cpp1z/fold2.C gcc/testsuite/g++.dg/cpp1z/fold2.C index 093a98bb334..6610c19a6a9 100644 --- gcc/testsuite/g++.dg/cpp1z/fold2.C +++ gcc/testsuite/g++.dg/cpp1z/fold2.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "" } // Check that we can fold over all of the operators required // by the standard in every possible way. diff --git gcc/testsuite/g++.dg/cpp1z/fold3.C gcc/testsuite/g++.dg/cpp1z/fold3.C index 7caa8483b6a..787bf792be9 100644 --- gcc/testsuite/g++.dg/cpp1z/fold3.C +++ gcc/testsuite/g++.dg/cpp1z/fold3.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "" } // Check that empty expansions and required failures. diff --git gcc/testsuite/g++.dg/cpp1z/fold4.C gcc/testsuite/g++.dg/cpp1z/fold4.C index 2365d50c3c4..e0ee131a9bb 100644 --- gcc/testsuite/g++.dg/cpp1z/fold4.C +++ gcc/testsuite/g++.dg/cpp1z/fold4.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class...T> constexpr auto f(T... t) diff --git gcc/testsuite/g++.dg/cpp1z/fold6.C gcc/testsuite/g++.dg/cpp1z/fold6.C index 29a20480e77..df290335b14 100644 --- gcc/testsuite/g++.dg/cpp1z/fold6.C +++ gcc/testsuite/g++.dg/cpp1z/fold6.C @@ -1,7 +1,7 @@ // Test that we reject a fold-expression with an LHS that is not a // cast-expression. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int i; diff --git gcc/testsuite/g++.dg/cpp1z/fold7.C gcc/testsuite/g++.dg/cpp1z/fold7.C index 74ef4abfaf7..d65d6e9d805 100644 --- gcc/testsuite/g++.dg/cpp1z/fold7.C +++ gcc/testsuite/g++.dg/cpp1z/fold7.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } #ifndef __cpp_fold_expressions #error __cpp_fold_expressions not defined diff --git gcc/testsuite/g++.dg/cpp1z/fold8.C gcc/testsuite/g++.dg/cpp1z/fold8.C index 68827e6f680..983e9eeec0d 100644 --- gcc/testsuite/g++.dg/cpp1z/fold8.C +++ gcc/testsuite/g++.dg/cpp1z/fold8.C @@ -1,5 +1,5 @@ // PR c++/68377 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct Sink { } s; template <class T> Sink& operator<<(Sink&, const T&); diff --git gcc/testsuite/g++.dg/cpp1z/fold9.C gcc/testsuite/g++.dg/cpp1z/fold9.C index 142c8b2c818..956d51d3c49 100644 --- gcc/testsuite/g++.dg/cpp1z/fold9.C +++ gcc/testsuite/g++.dg/cpp1z/fold9.C @@ -1,5 +1,5 @@ // PR c++/71285 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<typename... Args> void spurious(Args... args) diff --git gcc/testsuite/g++.dg/cpp1z/init-statement2.C gcc/testsuite/g++.dg/cpp1z/init-statement2.C index d1dc9188b1c..df788172c55 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement2.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement2.C @@ -1,4 +1,5 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } +// { dg-options "" } // Test C++17 selection statements with initializer, basic use. extern int foo (void); diff --git gcc/testsuite/g++.dg/cpp1z/init-statement3.C gcc/testsuite/g++.dg/cpp1z/init-statement3.C index b0cd14885ff..5b067a98574 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement3.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement3.C @@ -1,5 +1,4 @@ -// { dg-do run } -// { dg-options -std=c++17 } +// { dg-do run { target c++17 } } // Test C++17 selection statements with initializer, side-effects. int diff --git gcc/testsuite/g++.dg/cpp1z/init-statement4.C gcc/testsuite/g++.dg/cpp1z/init-statement4.C index 32a3f2d8b66..a049adb657a 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement4.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement4.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } extern int foo (void); extern void bar (int), die (void); diff --git gcc/testsuite/g++.dg/cpp1z/init-statement5.C gcc/testsuite/g++.dg/cpp1z/init-statement5.C index cf2b16a27bb..867955b285e 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement5.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement5.C @@ -1,5 +1,5 @@ // Testcase from P0305R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } enum class status_code { SUCCESS }; extern int get_value (); diff --git gcc/testsuite/g++.dg/cpp1z/init-statement6.C gcc/testsuite/g++.dg/cpp1z/init-statement6.C index 6f00d9de416..e1848aa5e4a 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement6.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement6.C @@ -1,5 +1,5 @@ // Testcase from P0305R1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <string> #include <map> diff --git gcc/testsuite/g++.dg/cpp1z/init-statement7.C gcc/testsuite/g++.dg/cpp1z/init-statement7.C index e4a598e145d..b2cf72d6d4a 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement7.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement7.C @@ -1,5 +1,4 @@ -// { dg-do run } -// { dg-options -std=c++17 } +// { dg-do run { target c++17 } } int main () diff --git gcc/testsuite/g++.dg/cpp1z/init-statement8.C gcc/testsuite/g++.dg/cpp1z/init-statement8.C index 574cc213787..9b613e70631 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement8.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement8.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int f () diff --git gcc/testsuite/g++.dg/cpp1z/init-statement9.C gcc/testsuite/g++.dg/cpp1z/init-statement9.C index f695a73fb3d..84b24d4eb2d 100644 --- gcc/testsuite/g++.dg/cpp1z/init-statement9.C +++ gcc/testsuite/g++.dg/cpp1z/init-statement9.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void f () diff --git gcc/testsuite/g++.dg/cpp1z/inline-var1.C gcc/testsuite/g++.dg/cpp1z/inline-var1.C index 7c014b52c24..3011676021d 100644 --- gcc/testsuite/g++.dg/cpp1z/inline-var1.C +++ gcc/testsuite/g++.dg/cpp1z/inline-var1.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -Wno-deprecated" } +// { dg-do run { target c++17 } } +// { dg-options "-Wno-deprecated" } // { dg-require-weak "" } // { dg-additional-sources "inline-var1a.C" } diff --git gcc/testsuite/g++.dg/cpp1z/inline-var1a.C gcc/testsuite/g++.dg/cpp1z/inline-var1a.C index 62d3708232d..b07c1d23877 100644 --- gcc/testsuite/g++.dg/cpp1z/inline-var1a.C +++ gcc/testsuite/g++.dg/cpp1z/inline-var1a.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17 -Wno-deprecated -g" } +// { dg-do compile { target c++17 } } +// { dg-options "-Wno-deprecated -g" } #include "inline-var1.h" diff --git gcc/testsuite/g++.dg/cpp1z/inline-var4.C gcc/testsuite/g++.dg/cpp1z/inline-var4.C index 48563b33e3e..e9eb1902c0d 100644 --- gcc/testsuite/g++.dg/cpp1z/inline-var4.C +++ gcc/testsuite/g++.dg/cpp1z/inline-var4.C @@ -1,5 +1,5 @@ // PR c++/82782 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <const auto& Value> struct make_char_sequence; diff --git gcc/testsuite/g++.dg/cpp1z/lambda-__func__.C gcc/testsuite/g++.dg/cpp1z/lambda-__func__.C index d5d1c1cb7b6..d1b02ef0281 100644 --- gcc/testsuite/g++.dg/cpp1z/lambda-__func__.C +++ gcc/testsuite/g++.dg/cpp1z/lambda-__func__.C @@ -1,5 +1,5 @@ // PR c++/84925 -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } template <typename> struct A { diff --git gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C index 75ef586b542..f89eb07b5a1 100644 --- gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C +++ gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C @@ -1,5 +1,5 @@ // PR c++/80767 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename... Fs> struct overloader : Fs... diff --git gcc/testsuite/g++.dg/cpp1z/lambda-this3.C gcc/testsuite/g++.dg/cpp1z/lambda-this3.C index c505ce3e1f9..93f2eb3496c 100644 --- gcc/testsuite/g++.dg/cpp1z/lambda-this3.C +++ gcc/testsuite/g++.dg/cpp1z/lambda-this3.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct S { int i; diff --git gcc/testsuite/g++.dg/cpp1z/namespace-attribs.C gcc/testsuite/g++.dg/cpp1z/namespace-attribs.C index b4dc5c4e017..dd1855137de 100644 --- gcc/testsuite/g++.dg/cpp1z/namespace-attribs.C +++ gcc/testsuite/g++.dg/cpp1z/namespace-attribs.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "" } namespace A __attribute ((visibility ("default"))) {} diff --git gcc/testsuite/g++.dg/cpp1z/namespace-attribs2.C gcc/testsuite/g++.dg/cpp1z/namespace-attribs2.C index 2049da33ab5..193dbf6e017 100644 --- gcc/testsuite/g++.dg/cpp1z/namespace-attribs2.C +++ gcc/testsuite/g++.dg/cpp1z/namespace-attribs2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } // { dg-additional-options "-pedantic" } namespace B [[deprecated]] {} // { dg-warning "ignored|must precede" } diff --git gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C index 8a6f0074fe8..c9b16dfaced 100644 --- gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C +++ gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "" } namespace A::B::C { diff --git gcc/testsuite/g++.dg/cpp1z/nodiscard3.C gcc/testsuite/g++.dg/cpp1z/nodiscard3.C index 4d4e60e42c9..4d24ce54413 100644 --- gcc/testsuite/g++.dg/cpp1z/nodiscard3.C +++ gcc/testsuite/g++.dg/cpp1z/nodiscard3.C @@ -1,6 +1,6 @@ /* nodiscard attribute tests, adapted from gcc.dg/attr-warn-unused-result.c. */ -/* { dg-do compile } */ -/* { dg-options "-std=c++17 -O -ftrack-macro-expansion=0" } */ +/* { dg-do compile { target c++17 } } */ +/* { dg-options "-O -ftrack-macro-expansion=0" } */ #define WUR [[nodiscard]] #define WURAI [[nodiscard, gnu::always_inline]] inline diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type1.C gcc/testsuite/g++.dg/cpp1z/noexcept-type1.C index 59c02552d60..00d9509c74b 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type1.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type1.C @@ -1,5 +1,5 @@ // Testcase from P0012r1 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void (*p)() throw(int); // { dg-error "dynamic exception specification" } void (**pp)() noexcept = &p; // { dg-error "" } cannot convert to pointer to noexcept function diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type12.C gcc/testsuite/g++.dg/cpp1z/noexcept-type12.C index 74404ad7ad1..051a452fb6b 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type12.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type12.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class R, class... A, bool B> void f(R (*)(A...) noexcept(B)) { } diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C index cc5a3edf1e4..8543859b3f5 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type15.C @@ -1,5 +1,5 @@ // PR c++/80384 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<class> struct foo; template<bool B> diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C index 2b6a108eb8e..b7a76fdd984 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C @@ -1,5 +1,5 @@ // PR c++/80614 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T> void fn() {} diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C index c8c731b5bbd..734f8f97935 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C @@ -1,5 +1,5 @@ // PR c++/80465 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } int foo(...); int main() { diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type18.C gcc/testsuite/g++.dg/cpp1z/noexcept-type18.C index e01fd0a2030..a018c940397 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type18.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type18.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } template<typename T> struct S; diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type2.C gcc/testsuite/g++.dg/cpp1z/noexcept-type2.C index 467bd46725c..f4e9e3b6c7a 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type2.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type2.C @@ -1,9 +1,9 @@ // Test for function pointer conversion on template arguments. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <void (*P)()> struct A { }; -void f() noexcept { }; +void f() noexcept { } constexpr void (*p)() noexcept = f; A<f> a; diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type3.C gcc/testsuite/g++.dg/cpp1z/noexcept-type3.C index b23c1c779f9..b678e05a74e 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type3.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type3.C @@ -1,5 +1,5 @@ // Test for overload resolution. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void f(void (*)() noexcept) = delete; void f(void (*)()) { } diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type4.C gcc/testsuite/g++.dg/cpp1z/noexcept-type4.C index 4777eef54d8..ff02a0bba87 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type4.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type4.C @@ -1,5 +1,5 @@ // Test for deduction. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class R, class... A> void f(R (*)(A...)); diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C index 6c1ebd1f13e..753a0b7bccb 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C @@ -1,5 +1,5 @@ // Test for composite pointer type. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } typedef void (*P)(); typedef void (*NP)() noexcept; diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type6.C gcc/testsuite/g++.dg/cpp1z/noexcept-type6.C index 8734c8d9c08..67e0bf8cf8c 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type6.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type6.C @@ -1,5 +1,5 @@ // Test for lambda conversion. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void f() { diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type7.C gcc/testsuite/g++.dg/cpp1z/noexcept-type7.C index 7c77a8d63df..53276478fbe 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type7.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type7.C @@ -1,5 +1,5 @@ // Test for static_cast. -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } void f() { diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type8.C gcc/testsuite/g++.dg/cpp1z/noexcept-type8.C index db70a680a78..007f14f7fe4 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type8.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type8.C @@ -1,6 +1,5 @@ // Test for exception handling. -// { dg-options -std=c++17 } -// { dg-do run } +// { dg-do run { target c++17 } } void f() {} void g() noexcept {} diff --git gcc/testsuite/g++.dg/cpp1z/noexcept-type9.C gcc/testsuite/g++.dg/cpp1z/noexcept-type9.C index 45b64997072..c965d9e4b14 100644 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type9.C +++ gcc/testsuite/g++.dg/cpp1z/noexcept-type9.C @@ -1,6 +1,5 @@ // Test for PMF template args. -// { dg-options -std=c++17 } -// { dg-do compile } +// { dg-do compile { target c++17 } } struct A { diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto1.C gcc/testsuite/g++.dg/cpp1z/nontype-auto1.C index def697c1a47..960f1ee2c1c 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto1.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto1.C @@ -1,5 +1,5 @@ // Testcase from P0127R2 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <long n> struct A { }; diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto10.C gcc/testsuite/g++.dg/cpp1z/nontype-auto10.C index 38d070ccaae..ec57b5436e7 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto10.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto10.C @@ -1,5 +1,5 @@ // PR c++/80096 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<auto> struct A { diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto12.C gcc/testsuite/g++.dg/cpp1z/nontype-auto12.C index 7bff75c3484..cc4022c5f3e 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto12.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto12.C @@ -1,5 +1,5 @@ // PR c++/79092 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<auto V> struct val {}; diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto13.C gcc/testsuite/g++.dg/cpp1z/nontype-auto13.C index 2152cef811e..32f109e8af9 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto13.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto13.C @@ -1,5 +1,5 @@ // PR c++/82331 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <auto> class X; diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C index d7ab133baaa..0d350a398fe 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto14.C @@ -1,5 +1,5 @@ // PR c++/82231 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<int> struct x {}; diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto2.C gcc/testsuite/g++.dg/cpp1z/nontype-auto2.C index 7152768fd92..dc6ec483bff 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto2.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto2.C @@ -1,5 +1,5 @@ // Testcase from P0127R2 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <typename T> struct S; template <typename T, T n> struct S<int[n]> { diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto3.C gcc/testsuite/g++.dg/cpp1z/nontype-auto3.C index 9b96c1fd18b..b1aed4392a7 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto3.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto3.C @@ -1,5 +1,5 @@ // Testcase from P0127R2 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template<auto n> struct B { decltype(n) f = n; }; B<5> b1; // OK: template parameter type is int diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto4.C gcc/testsuite/g++.dg/cpp1z/nontype-auto4.C index 5833c08531b..36b2b3fc4d6 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto4.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto4.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T, T n> void f(T, int (&)[n]); template <class T, T n> void g(int (&)[n], T); diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C index 323a89632a9..90d8ba91e18 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A { diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto7.C gcc/testsuite/g++.dg/cpp1z/nontype-auto7.C index bca6576d590..2637a890afb 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto7.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto7.C @@ -1,5 +1,5 @@ // PR c++/78334 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <auto> auto constexpr_string([](auto) {}); -void foo() { constexpr_string<0>(0); }; +void foo() { constexpr_string<0>(0); } diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto8.C gcc/testsuite/g++.dg/cpp1z/nontype-auto8.C index 146ad440d98..9b26d8a81c1 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto8.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto8.C @@ -1,5 +1,5 @@ // PR c++/79549 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <auto...> struct meow; diff --git gcc/testsuite/g++.dg/cpp1z/nontype-auto9.C gcc/testsuite/g++.dg/cpp1z/nontype-auto9.C index 65f5cfe7ce4..be4ee9f31a4 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype-auto9.C +++ gcc/testsuite/g++.dg/cpp1z/nontype-auto9.C @@ -1,5 +1,5 @@ // PR c++/79556 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } template <auto> struct A; template <auto...> struct B; diff --git gcc/testsuite/g++.dg/cpp1z/nontype1.C gcc/testsuite/g++.dg/cpp1z/nontype1.C index 342a0a6aa1d..4bbab5ee7fc 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype1.C +++ gcc/testsuite/g++.dg/cpp1z/nontype1.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct S { int m; static int s; } s; diff --git gcc/testsuite/g++.dg/cpp1z/nontype2.C gcc/testsuite/g++.dg/cpp1z/nontype2.C index feb4b4aaf6e..393c8332c76 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype2.C +++ gcc/testsuite/g++.dg/cpp1z/nontype2.C @@ -1,4 +1,4 @@ -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } #include <typeinfo> diff --git gcc/testsuite/g++.dg/cpp1z/nontype3.C gcc/testsuite/g++.dg/cpp1z/nontype3.C index 29805b5617f..80f1e98ab76 100644 --- gcc/testsuite/g++.dg/cpp1z/nontype3.C +++ gcc/testsuite/g++.dg/cpp1z/nontype3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } #ifndef __cpp_nontype_template_args #error __cpp_nontype_template_args not defined diff --git gcc/testsuite/g++.dg/cpp1z/pr78771.C gcc/testsuite/g++.dg/cpp1z/pr78771.C index 80e3a92ed91..54ea56ae4e0 100644 --- gcc/testsuite/g++.dg/cpp1z/pr78771.C +++ gcc/testsuite/g++.dg/cpp1z/pr78771.C @@ -1,5 +1,5 @@ // PR c++/78771 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } // ICE instantiating a deleted inherited ctor diff --git gcc/testsuite/g++.dg/cpp1z/pr79143.C gcc/testsuite/g++.dg/cpp1z/pr79143.C index ef8c1f6bdde..9d57a1abdeb 100644 --- gcc/testsuite/g++.dg/cpp1z/pr79143.C +++ gcc/testsuite/g++.dg/cpp1z/pr79143.C @@ -1,6 +1,5 @@ // PR c++/79143 -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } struct base { base (int, int) {} diff --git gcc/testsuite/g++.dg/cpp1z/pr81016.C gcc/testsuite/g++.dg/cpp1z/pr81016.C index 4826fbfb775..358b12056c0 100644 --- gcc/testsuite/g++.dg/cpp1z/pr81016.C +++ gcc/testsuite/g++.dg/cpp1z/pr81016.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } template <typename a, a> struct b; template <typename c> struct b<bool, c::d>; // { dg-error "template parameter" } diff --git gcc/testsuite/g++.dg/cpp1z/pr83020.C gcc/testsuite/g++.dg/cpp1z/pr83020.C index 43a7e382d39..0bd724b422f 100644 --- gcc/testsuite/g++.dg/cpp1z/pr83020.C +++ gcc/testsuite/g++.dg/cpp1z/pr83020.C @@ -1,5 +1,5 @@ // PR c++/83020 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } struct NoDefault { int val = 1234; diff --git gcc/testsuite/g++.dg/cpp1z/pr83644.C gcc/testsuite/g++.dg/cpp1z/pr83644.C index 493d8c7cbe4..3bce9167e01 100644 --- gcc/testsuite/g++.dg/cpp1z/pr83644.C +++ gcc/testsuite/g++.dg/cpp1z/pr83644.C @@ -1,6 +1,5 @@ // PR c++/83644 -// { dg-do compile } -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } namespace std { template <typename> bool is_invocable_v; diff --git gcc/testsuite/g++.dg/cpp1z/pr83918.C gcc/testsuite/g++.dg/cpp1z/pr83918.C index d4fe82631ed..cbeb6cc9ef9 100644 --- gcc/testsuite/g++.dg/cpp1z/pr83918.C +++ gcc/testsuite/g++.dg/cpp1z/pr83918.C @@ -1,6 +1,5 @@ // PR c++/83918 -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } constexpr unsigned foo (unsigned x, unsigned y) diff --git gcc/testsuite/g++.dg/cpp1z/pr84325.C gcc/testsuite/g++.dg/cpp1z/pr84325.C index dddadc32692..6ccbb2fae3b 100644 --- gcc/testsuite/g++.dg/cpp1z/pr84325.C +++ gcc/testsuite/g++.dg/cpp1z/pr84325.C @@ -1,6 +1,5 @@ // PR c++/84325 -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } struct seconds { int i_{0}; constexpr seconds (int) {} }; template <char... _Digits> constexpr seconds operator""_s() { diff --git gcc/testsuite/g++.dg/cpp1z/pr84533.C gcc/testsuite/g++.dg/cpp1z/pr84533.C index 0a71fe1b7de..4aff8bd34c4 100644 --- gcc/testsuite/g++.dg/cpp1z/pr84533.C +++ gcc/testsuite/g++.dg/cpp1z/pr84533.C @@ -1,3 +1,3 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } enum E { e, e }; // { dg-error "redefinition" } diff --git gcc/testsuite/g++.dg/cpp1z/range-for1.C gcc/testsuite/g++.dg/cpp1z/range-for1.C index fc134b80fbc..4bca986d3b5 100644 --- gcc/testsuite/g++.dg/cpp1z/range-for1.C +++ gcc/testsuite/g++.dg/cpp1z/range-for1.C @@ -1,5 +1,5 @@ // P0184R0: Generalizing the Range-Based For Loop -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } struct A { int ar[4]; diff --git gcc/testsuite/g++.dg/cpp1z/regress1.C gcc/testsuite/g++.dg/cpp1z/regress1.C index 2bebed02b1a..a62833dfb08 100644 --- gcc/testsuite/g++.dg/cpp1z/regress1.C +++ gcc/testsuite/g++.dg/cpp1z/regress1.C @@ -1,5 +1,5 @@ // PR c++/67114 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } typedef unsigned uint32_t; class A { diff --git gcc/testsuite/g++.dg/cpp1z/regress2.C gcc/testsuite/g++.dg/cpp1z/regress2.C index 3950dbf3a26..aa052044bae 100644 --- gcc/testsuite/g++.dg/cpp1z/regress2.C +++ gcc/testsuite/g++.dg/cpp1z/regress2.C @@ -1,5 +1,5 @@ // PR c++/67142 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } namespace detail { template <int> int split_at; diff --git gcc/testsuite/g++.dg/cpp1z/static1.C gcc/testsuite/g++.dg/cpp1z/static1.C index cb872997c5a..2e61337d9d1 100644 --- gcc/testsuite/g++.dg/cpp1z/static1.C +++ gcc/testsuite/g++.dg/cpp1z/static1.C @@ -1,5 +1,5 @@ // PR c++/84582 -// { dg-options -std=c++17 } +// { dg-do compile { target c++17 } } class C { static inline const long b = 0; diff --git gcc/testsuite/g++.dg/cpp1z/static2.C gcc/testsuite/g++.dg/cpp1z/static2.C index b87bfec3aaa..9462e0355c8 100644 --- gcc/testsuite/g++.dg/cpp1z/static2.C +++ gcc/testsuite/g++.dg/cpp1z/static2.C @@ -1,4 +1,4 @@ -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template <class T> struct A diff --git gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C index 6f787cde958..9749e14ccd0 100644 --- gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C +++ gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } template<typename T> struct is_float diff --git gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C index 6ab57463203..0e921963835 100644 --- gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C +++ gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } constexpr int operator""_foo(char c) diff --git gcc/testsuite/g++.dg/cpp1z/utf8-2.C gcc/testsuite/g++.dg/cpp1z/utf8-2.C index da2e83f5f0b..633326931ab 100644 --- gcc/testsuite/g++.dg/cpp1z/utf8-2.C +++ gcc/testsuite/g++.dg/cpp1z/utf8-2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } #ifndef __cpp_unicode_characters #error __cpp_unicode_characters not defined diff --git gcc/testsuite/g++.dg/cpp1z/utf8-neg.C gcc/testsuite/g++.dg/cpp1z/utf8-neg.C index cb9f7b55084..0a94f1ac650 100644 --- gcc/testsuite/g++.dg/cpp1z/utf8-neg.C +++ gcc/testsuite/g++.dg/cpp1z/utf8-neg.C @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-options "-std=c++17" } */ +/* { dg-do compile { target c++17 } } */ const static char c0 = u8''; // { dg-error "empty character" } const static char c1 = u8'ab'; // { dg-warning "multi-character character constant" } diff --git gcc/testsuite/g++.dg/cpp1z/utf8.C gcc/testsuite/g++.dg/cpp1z/utf8.C index ff98b58835c..e08fbb9c86e 100644 --- gcc/testsuite/g++.dg/cpp1z/utf8.C +++ gcc/testsuite/g++.dg/cpp1z/utf8.C @@ -1,5 +1,4 @@ -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } #include <cassert> #include <experimental/type_traits> diff --git gcc/testsuite/g++.dg/cpp2a/lambda-this3.C gcc/testsuite/g++.dg/cpp2a/lambda-this3.C index 5e5c8b3d50f..d1738ea7d17 100644 --- gcc/testsuite/g++.dg/cpp2a/lambda-this3.C +++ gcc/testsuite/g++.dg/cpp2a/lambda-this3.C @@ -1,6 +1,6 @@ // P0806R2 -// { dg-do compile } -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "" } struct X { int x; diff --git gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C index 6a12d6c0ee7..fc3e6fd435f 100644 --- gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C +++ gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-O -std=c++17 -g -dA -gno-strict-dwarf" } +// { dg-do compile { target c++17 } } +// { dg-options "-O -g -dA -gno-strict-dwarf" } // { dg-require-weak "" } // { dg-final { scan-assembler-times "0x3\[^\n\r]* DW_AT_inline" 6 { xfail *-*-aix* } } } // { dg-final { scan-assembler-times "0x1\[^\n\r]* DW_AT_inline" 2 { xfail *-*-aix* } } } diff --git gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C index ed00fb5d2c9..cdb2696a86d 100644 --- gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C +++ gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-O -std=c++17 -gdwarf-5 -dA -gno-strict-dwarf" } +// { dg-do compile { target c++17 } } +// { dg-options "-O -gdwarf-5 -dA -gno-strict-dwarf" } // { dg-require-weak "" } // { dg-final { scan-assembler-not "DW_TAG_member" { xfail *-*-aix* } } } diff --git gcc/testsuite/g++.dg/debug/dwarf2/pr80234-1.C gcc/testsuite/g++.dg/debug/dwarf2/pr80234-1.C index 5ab8ca84aaf..85e4434f7b0 100644 --- gcc/testsuite/g++.dg/debug/dwarf2/pr80234-1.C +++ gcc/testsuite/g++.dg/debug/dwarf2/pr80234-1.C @@ -1,6 +1,6 @@ // PR debug/80234 -// { dg-do compile } -// { dg-options "-gdwarf-4 -std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "-gdwarf-4" } struct S { diff --git gcc/testsuite/g++.dg/debug/dwarf2/pr80234-2.C gcc/testsuite/g++.dg/debug/dwarf2/pr80234-2.C index 145beacf6eb..0d612d8fe25 100644 --- gcc/testsuite/g++.dg/debug/dwarf2/pr80234-2.C +++ gcc/testsuite/g++.dg/debug/dwarf2/pr80234-2.C @@ -1,6 +1,6 @@ // PR debug/80234 -// { dg-do compile } -// { dg-options "-gdwarf-5 -std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "-gdwarf-5" } struct S { diff --git gcc/testsuite/g++.dg/ext/integer-pack4.C gcc/testsuite/g++.dg/ext/integer-pack4.C index 6e5125baab0..4859d95d741 100644 --- gcc/testsuite/g++.dg/ext/integer-pack4.C +++ gcc/testsuite/g++.dg/ext/integer-pack4.C @@ -1,4 +1,4 @@ -// { dg-additional-options -std=c++17 } +// { dg-do compile { target c++17 } } template<int ... Ns> int f() { return (Ns + ...); } template<int N> int g() { diff --git gcc/testsuite/g++.dg/gomp/pr84556.C gcc/testsuite/g++.dg/gomp/pr84556.C index 188d5a49b91..97a58ee9d12 100644 --- gcc/testsuite/g++.dg/gomp/pr84556.C +++ gcc/testsuite/g++.dg/gomp/pr84556.C @@ -1,6 +1,6 @@ // PR c++/84556 -// { dg-do compile } -// { dg-options "-std=c++17 -fopenmp-simd" } +// { dg-do compile { target c++17 } } +// { dg-options "-fopenmp-simd" } void foo () diff --git gcc/testsuite/g++.dg/ipa/pr81248.C gcc/testsuite/g++.dg/ipa/pr81248.C index d55d2e751e8..d7796ff7ab7 100644 --- gcc/testsuite/g++.dg/ipa/pr81248.C +++ gcc/testsuite/g++.dg/ipa/pr81248.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-O2 -std=c++17 -fdump-tree-eipa_sra" } +// { dg-do compile { target c++17 } } +// { dg-options "-O2 -fdump-tree-eipa_sra" } #include <type_traits> diff --git gcc/testsuite/g++.dg/pr81194.C gcc/testsuite/g++.dg/pr81194.C index 5f949389ec6..08f6fc0f39f 100644 --- gcc/testsuite/g++.dg/pr81194.C +++ gcc/testsuite/g++.dg/pr81194.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-O2 -std=c++17 -fno-exceptions" } +// { dg-do compile { target c++17 } } +// { dg-options "-O2 -fno-exceptions" } // { dg-additional-options "-Wno-return-type" } template <class a> struct b { typedef a *c; }; diff --git gcc/testsuite/g++.dg/pr82836.C gcc/testsuite/g++.dg/pr82836.C index 5469614cf8f..82d32609704 100644 --- gcc/testsuite/g++.dg/pr82836.C +++ gcc/testsuite/g++.dg/pr82836.C @@ -1,5 +1,5 @@ // PR c++/82836 -// { dg-options "-std=c++17" } +// { dg-do compile { target c++17 } } // { dg-require-effective-target int128 } // { dg-require-effective-target __float128 } // { dg-additional-options "-Wno-pedantic -Wno-return-type" } diff --git gcc/testsuite/g++.dg/ubsan/pr79589.C gcc/testsuite/g++.dg/ubsan/pr79589.C index 4b72bc8b9ba..d19ca2d9b4f 100644 --- gcc/testsuite/g++.dg/ubsan/pr79589.C +++ gcc/testsuite/g++.dg/ubsan/pr79589.C @@ -1,6 +1,6 @@ // PR sanitizer/79589 -// { dg-do compile } -// { dg-options "-fsanitize=undefined -std=c++17" } +// { dg-do compile { target c++17 } } +// { dg-options "-fsanitize=undefined" } struct A { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r; } a[64]; diff --git gcc/testsuite/lib/g++-dg.exp gcc/testsuite/lib/g++-dg.exp index 12af1fdf682..36d68e727ad 100644 --- gcc/testsuite/lib/g++-dg.exp +++ gcc/testsuite/lib/g++-dg.exp @@ -52,7 +52,7 @@ proc g++-dg-runtest { testcases flags default-extra-flags } { if { [llength $gpp_std_list] > 0 } { set std_list $gpp_std_list } else { - set std_list { 98 11 14 } + set std_list { 98 14 17 } } set option_list { } foreach x $std_list {