re PR c++/77967 (ICE in cp_parser_type_name, at cp/parser.c:16419 (trying to add...
authorMarek Polacek <polacek@redhat.com>
Sat, 8 Jun 2019 00:30:51 +0000 (00:30 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sat, 8 Jun 2019 00:30:51 +0000 (00:30 +0000)
PR c++/77967
* g++.dg/cpp0x/alias-decl-68.C: New test.

From-SVN: r272070

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C [new file with mode: 0644]

index 0ea046501749bcbadc63f8a718c4207110066968..b7812e9416e26693a625c3fa924cf2ae6c574382 100644 (file)
@@ -1,5 +1,8 @@
 2019-06-07  Marek Polacek  <polacek@redhat.com>
 
+       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 (file)
index 0000000..2250ef0
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/77967
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+using bar = const T&;
+
+template<typename T>
+bar<T>::bar(const T& cr) // { dg-error "" }
+{
+}