[PATCH] c: Fix ICE with -fexcess-precision=standard [PR99136]
Joseph Myers
joseph@codesourcery.com
Thu Feb 18 20:15:15 GMT 2021
On Thu, 18 Feb 2021, Jakub Jelinek via Gcc-patches wrote:
> Hi!
>
> The following testcase ICEs on i686-linux, because c_finish_return wraps
> c_fully_folded retval back into EXCESS_PRECISION_EXPR, but when the function
> return type is void, we don't call convert_for_assignment on it that would
> then be fully folded again, but just put the retval into RETURN_EXPR's
> operand, so nothing removes it anymore and during gimplification we
> ICE as EXCESS_PRECISION_EXPR is not handled.
>
> This patch fixes it by not adding that EXCESS_PRECISION_EXPR in functions
> returning void, the return value is ignored and all we need is evaluate any
> side-effects of the expression.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list