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: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Thu, 4 Dec 2014 16:59:21 +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>
2014-12-04 16:47 GMT+01:00 Marek Polacek <polacek@redhat.com>:
> On Thu, Dec 04, 2014 at 04:12:02PM +0100, Kai Tietz wrote:
>> Hi,
>>
>> this patch fixes an ICE happening on invalid code for < c++11. It is
>> reasoned by
>> accessing blindly identifier without checking that it is a declaration.
>>
>> ChangeLog
>>
>> 2014-12-04 Kai Tietz <ktietz@redhat.com>
>>
>> PR c++/64127
>> * parser.c (cp_parser_diagnose_invalid_type_name): Check
>> id for being a declaration before accessing identifier.
>>
>> Tested on x86_64-unknown-linux-gnu.
>>
>> Ok for apply?
>
> Testcase?
>
> Marek
Same as said before. Issue is a invalid-code bug with ICE, and
error-messages are pretty meaningless. It would be helpful to have in
testsuite just the opportunity to test for no ICE.
Anyway, if testcase is requested, I can add it to g++.dg/ collection
Kai