re PR c++/72774 (ICE on invalid C++ code on x86_64-linux-gnu (tree check: expected...
authorJakub Jelinek <jakub@redhat.com>
Fri, 11 Nov 2016 13:39:06 +0000 (14:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 11 Nov 2016 13:39:06 +0000 (14:39 +0100)
PR c++/72774
* g++.dg/parse/pr72774.C: New test.

From-SVN: r242070

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/pr72774.C [new file with mode: 0644]

index 87f09bd42595875140a12d793b3c2aa08272250b..3289f756f163aca4af9c5e10d3f5fa8d637ab6b1 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/72774
+       * g++.dg/parse/pr72774.C: New test.
+
 2016-11-11  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/71575
diff --git a/gcc/testsuite/g++.dg/parse/pr72774.C b/gcc/testsuite/g++.dg/parse/pr72774.C
new file mode 100644 (file)
index 0000000..487a1a3
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/72774
+// { dg-do compile }
+
+void baz ();
+namespace A { void foo (); }
+void bar ()
+{
+  using A::foo;
+  0 ? static_cast<foo> (0) : baz;      // { dg-error "does not name a type" }
+}