This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, PR28050] Fix ICE on invalid initializer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]