Commit be515b4c by Marek Polacek Committed by Marek Polacek

*.C: Use target c++17 instead of explicit dg-options.

	* 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.

From-SVN: r265343
parent ca66a6cd
2018-10-20 Marek Polacek <polacek@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.
2018-10-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87647
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <class T1, class T2> class A { };
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <class...> class tuple {};
......
// 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 {};
......
// { 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);
......
// 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);
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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; }
......
// { 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; }
......
// { 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); }
......
// 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; }
......
// { 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" }
......
// PR c++/67007
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <class U>
concept bool A =
......
// 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);
......
// 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;
......
// PR c++/66092
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
#include <type_traits>
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Check equivalence of short- and longhand declarations.
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
// template<typename T>
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { 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); }
......
// { 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); }
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
struct A {
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
#include <iostream>
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C1()
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C()
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
#ifndef __cpp_concepts
#error __cpp_concepts not defined
......
// { 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" }
......
// { 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" }
......
// { 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); }
......
// { 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.
......
// { 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); }
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { 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); }
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Check shorthand notation.
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Redefinition errors.
......
// { dg-do link }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do link { target c++17 } }
// { dg-options "-fconcepts" }
// FIXME: What is this actually testing?
......
// { 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); }
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { 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; }; }
......
// { 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; }; }
......
// { 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); }
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
#include <type_traits>
......
// PR c++/67240
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
int foo(int x)
{
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { 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); }
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C = __is_class(T);
......
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename ... T>
concept bool C1 = true;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename ... T>
concept bool C1 = true;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T, typename U = int>
concept bool C()
......
// PR c++/67003
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
namespace X {
template<class>
......
// 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>; };
......
// { dg-additional-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-additional-options "-fconcepts" }
struct S
{
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
struct Base {
template<typename T>
......
// { dg-do run}
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
......
// { dg-do run}
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do run { target c++17 } }
// { dg-options "-fconcepts" }
#include <cassert>
......
// PR c++/72415
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<int... Indices>
struct indices {};
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <class T>
struct A {
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool Type() { return true; }
......
// { 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.
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Check that constraints don't break unconstrained partial
// specializations.
......
// 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;
......
// { 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*> { };
......
// { 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);
......
// 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;
......
// 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; };
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T, typename U>
struct is_same
......
// { 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...
......
// 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);
......
// 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);
......
// { 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);
......
// { 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;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool Concept() {
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C = false;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C1() {
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
using TD = int;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C()
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Performance test... This should be fast.
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
// Handle alias templates in type requirements.
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template<typename T>
concept bool C1()
......
// { 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 {};
......
// { 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>;
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <class>
concept bool C1 () {
......
// { dg-options "-std=c++17 -fconcepts" }
// { dg-do compile { target c++17 } }
// { dg-options "-fconcepts" }
template <typename, typename>
struct is_same {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment