[PATCH, PR61191, Cilk+] Fix ICE on syntax error

Jeff Law law@redhat.com
Tue May 20 16:36:00 GMT 2014


On 05/20/14 09:27, H.J. Lu wrote:
> On Tue, May 20, 2014 at 7:31 AM, Zamyatin, Igor <igor.zamyatin@intel.com> wrote:
>> Hi all!
>>
>> The following patch fixes the ICE for the cilk code with syntax error.
>>
>> Regtested on x86_64.
>> Ok for trunk and 4.9?
>>
>> Thanks,
>> Igor
>>
>>
>> gcc/c/ChangeLog:
>>
>> 2014-05-20  Igor Zamyatin  <igor.zamyatin@intel.com>
>>
>> * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
>> function parameters.
>>
>>
>> diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
>> index 0ac6ba8..127f9a1 100644
>> --- a/gcc/c/c-array-notation.c
>> +++ b/gcc/c/c-array-notation.c
>> @@ -229,6 +229,8 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
>>     /* Fully fold any EXCESSIVE_PRECISION EXPR that can occur in the function
>>        parameter.  */
>>     func_parm = c_fully_fold (func_parm, false, NULL);
>> +  if (func_parm == error_mark_node)
>> +    return error_mark_node;
>>
>>     location = EXPR_LOCATION (an_builtin_fn);
>>
>
> You should include a testcase.
Agreed.  This definitely should include a testcase.

jeff



More information about the Gcc-patches mailing list