From 5521a7185005b92d58ad5eff5a0df754b627c4d2 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sat, 8 Jun 2019 00:30:51 +0000 Subject: [PATCH] re PR c++/77967 (ICE in cp_parser_type_name, at cp/parser.c:16419 (trying to add a method to a template alias)) PR c++/77967 * g++.dg/cpp0x/alias-decl-68.C: New test. From-SVN: r272070 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0ea04650174..b7812e9416e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-06-07 Marek Polacek + PR c++/77967 + * g++.dg/cpp0x/alias-decl-68.C: New test. + PR c++/77771 * g++.dg/cpp0x/constexpr-77771.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C new file mode 100644 index 00000000000..2250ef081d9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C @@ -0,0 +1,10 @@ +// PR c++/77967 +// { dg-do compile { target c++11 } } + +template +using bar = const T&; + +template +bar::bar(const T& cr) // { dg-error "" } +{ +} -- 2.30.2