This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, PR28050] Fix ICE on invalid initializer
- From: Ian Lance Taylor <iant at google dot com>
- To: Matthias Klose <doko at ubuntu dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Jun 2009 07:50:41 -0700
- Subject: Re: [patch, PR28050] Fix ICE on invalid initializer
- References: <4A3F6855.9020500@ubuntu.com>
Matthias Klose <doko@ubuntu.com> writes:
> Patch taken from the bug report, the C part is approved in the bug report. No
> regressions on i686-linux on the trunk. Of for the trunk? Ok for the branch
> after testing succeeds?
>
> Matthias
> gcc/
> PR objc/28050
> * c-parser.c (c_parser_objc_message_args): Return error_mark_node
> instead of NULL if a parser error occurs.
>
> objc/
> PR objc/28050
> * objc-act.c (objc_build_message_args): Return if ARGS is the
> error_mark_node.
>
> gcc/testsuite
> PR objc/28050
> * pr28050.m: New testcase.
>
> Index: gcc/objc/objc-act.c
> ===================================================================
> --- gcc/objc/objc-act.c (revision 148783)
> +++ gcc/objc/objc-act.c (working copy)
> @@ -6268,7 +6268,8 @@
> #endif
> tree method_params = NULL_TREE;
>
> - if (TREE_CODE (receiver) == ERROR_MARK)
> + if (TREE_CODE (receiver) == ERROR_MARK
> + || TREE_CODE (args) == ERROR_MARK)
> return error_mark_node;
The convention is to write
if (receiver == error_mark_node || args == error_mark_node)
This is OK with that change.
Thanks.
Ian