Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.old-deja/g++.pt/crash8.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do assemble } template<class T> class TestClass1 { public: TestClass1() { } }; template<class T> class TestClass2 { public: TestClass2() { } T operator()(int) { } }; template<class T> void doit(T x) { TestClass1<T> q1; q1 = TestClass1<T>(); TestClass2<T> q2; q2 = TestClass2<T>(); TestClass1<T> p1; p1 = TestClass1(); // { dg-error "8:cannot deduce template arguments" "" { target c++17 } } template used as expression // { dg-error "18:missing template arguments" "" { target c++14_down } .-1 } TestClass2<T> p2; p2 = TestClass2(); // { dg-error "8:cannot deduce template arguments" "" { target c++17 } } template used as expression // { dg-error "18:missing template arguments" "" { target c++14_down } .-1 } } int main() { double x; doit(x); }