From 943e7063e4eb691ecb43f383b4228d8601f10e97 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sat, 22 Jun 2019 16:29:06 +0000 Subject: [PATCH] re PR c++/65707 (internal compiler error: in unify, at cp/pt.c:18577) PR c++/65707 PR c++/89480 PR c++/58836 * g++.dg/cpp0x/nondeduced5.C: New test. * g++.dg/cpp0x/nondeduced6.C: New test. * g++.dg/cpp0x/nondeduced7.C: New test. From-SVN: r272589 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/g++.dg/cpp0x/nondeduced5.C | 12 ++++++++++++ gcc/testsuite/g++.dg/cpp0x/nondeduced6.C | 24 ++++++++++++++++++++++++ gcc/testsuite/g++.dg/cpp0x/nondeduced7.C | 6 ++++++ 4 files changed, 49 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/nondeduced5.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/nondeduced6.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/nondeduced7.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d1226e6c370..02a64ca7fab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2019-06-22 Marek Polacek + PR c++/65707 + PR c++/89480 + PR c++/58836 + * g++.dg/cpp0x/nondeduced5.C: New test. + * g++.dg/cpp0x/nondeduced6.C: New test. + * g++.dg/cpp0x/nondeduced7.C: New test. + PR c++/66256 * g++.dg/cpp0x/noexcept54.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C b/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C new file mode 100644 index 00000000000..dd890ec4b69 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nondeduced5.C @@ -0,0 +1,12 @@ +// PR c++/65707 +// { dg-do compile { target c++11 } } + +template struct b { + typedef int c; + constexpr operator c() { return a; } +}; +template struct d; +template struct e : b {}; +template > struct f; +template struct f{}>> {}; +template struct f; diff --git a/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C b/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C new file mode 100644 index 00000000000..9f68e304f03 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nondeduced6.C @@ -0,0 +1,24 @@ +// PR c++/89480 +// { dg-do compile { target c++11 } } + +template +struct TSelect {}; + +enum What { + The +}; + +template +struct AnotherOneSelector { + static constexpr Foo Id = Foo::The; +}; + +template +struct THelper; + +template +struct THelper::Id}>> {}; + +int main() { + THelper> t; +} diff --git a/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C b/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C new file mode 100644 index 00000000000..a8aa073c57e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nondeduced7.C @@ -0,0 +1,6 @@ +// PR c++/58836 +// { dg-do compile { target c++11 } } + +template struct A; +template struct A {}; // { dg-error "partial specialization" } +A a; -- 2.30.2