[C++] Add test for c++/77967

Message ID 20190608003046.GS5989@redhat.com
State New
Headers show
Series
  • [C++] Add test for c++/77967
Related show

Commit Message

Marek Polacek June 8, 2019, 12:30 a.m.
Fixed by r246462.

Tested x86_64-linux, applying to trunk.

2019-06-07  Marek Polacek  <polacek@redhat.com>

	PR c++/77967
	* g++.dg/cpp0x/alias-decl-68.C: New test.

Patch

diff --git gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C
new file mode 100644
index 00000000000..2250ef081d9
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/alias-decl-68.C
@@ -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 "" }
+{
+}