[PATCH] Fix another ipa-split caused ICE (PR ipa/69241)

Jeff Law law@redhat.com
Thu Feb 11 20:17:00 GMT 2016


On 02/11/2016 02:22 AM, Richard Biener wrote:
> On Wed, 10 Feb 2016, Jakub Jelinek wrote:
>
>> Hi!
>>
>> Markus has pointed out to a reduced testcase which still ICEs even with the
>> PR69241 fix.  In that case the function with TREE_ADDRESSABLE return type
>> does not return at all (and -Wreturn-type properly diagnoses it).
>> For that case the following patch just forces the lhs on the *.part.*
>> call, so that we don't ICE in assign_temp.
>>
>> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> Um...  I wonder if it wouldn't be better to force such functions to
> be noreturn by say, placing a __builtin_unreachable () at the missing
> return and maybe even adjust the return type.
Remember that __builtin_unreachable doesn't actually insert any real 
code, so if by some means we get to that point, we'll happily continue 
executing whatever code is there, which opens a potential security hole.

I generally prefer __builtin_trap over __builtin_unreachable.  The 
single instruction is of marginal cost and provides a level of safety if 
we do manage to get into "unreachable" code.

Jeff



More information about the Gcc-patches mailing list