[Patch] Don't expand targetm.stack_protect_fail if it's NULL_TREE

Jeff Law law@redhat.com
Thu Oct 20 18:51:00 GMT 2016

On 10/20/2016 09:28 AM, Jiong Wang wrote:
> The current code suppose targetm.stack_protect_fail always generate
> something.
> But in case one target start to generate NULL_TREE, there will be ICE.
> This
> patch adds a simple sanity check to only call expand if it's not NULL_TREE.
> OK for trunk?
> gcc/
> 2016-10-20  Jiong Wang  <jiong.wang@arm.com>
>         * function.c (stack_protect_epilogue): Only expands
>         targetm.stack_protect_fail if it's not NULL_TREE.
Is there some reason we don't want to issue an error here and stop 
compilation?  I'm not at all comfortable silently ignoring failure to 
generate stack protector code.


More information about the Gcc-patches mailing list