This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Thu, 4 Dec 2014 19:17:12 +0100
- Subject: Re: [patch c++]: Fix PR/64127 ICE on invalid: tree check: exprected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name
- Authentication-results: sourceware.org; auth=none
- References: <CAEwic4YDKvn=YqzfpKAUyWUEMS-LkCdDwzeOaXd=jt-2n_5-ag at mail dot gmail dot com> <20141204154715 dot GF16332 at redhat dot com> <CAEwic4Zafj-jFiEB4jXHjNZsOpBu5UtAux9c+Ee8onX7979jVA at mail dot gmail dot com> <20141204163218 dot GD1923 at tucnak dot redhat dot com>
So added testcase for this pr (its c++98 only)
So:
ChangeLog testsuite
2014-12-04 Kai Tietz <ktietz@redhat.com>
PR c++/64127
* g++.dg/cpp/pr64127.C: New file.
Tested on x86_64-unknown-linux-gnu.
Ok to apply prior posted patch plus this new testcase?
Regards,
Kai
Index: gcc/gcc/testsuite/g++.dg/cpp/pr64127.C
===================================================================
--- /dev/null
+++ gcc/gcc/testsuite/g++.dg/cpp/pr64127.C
@@ -0,0 +1,9 @@
+/* { dg-do compile { target c++98_only } } */
+
+template <0> int __copy_streambufs_eof; // { dg-error "" }
+// { dg-error "numeric constant" "" { target *-*-* } 3 }
+// { dg-warning "variable templates" "" { target *-*-* } 3 }
+__copy_streambufs_eof < // { dg-error "" }
+// { dg-error "parse error" "" { target *-*-* } 6 }
+// { dg-error "not name a type" "" { target *-*-* } 6 }
+