[Bug tree-optimization/86532] [9 Regression] Wrong code due to a wrong strlen folding starting with r262522

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Wed Jul 18 04:05:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86532

--- Comment #22 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Martin Sebor from comment #21)
> Thanks for testing the patch!  I've tweaked it to avoid the ICE.  I'm not
> sure what masked the ICE in my testing but mixing signed and unsigned types
> in the same expression without conversion was the cause.

No problem.

One thought: if you already fold the strlen in a way where undefined
behaviour is singled out, could you also emit a gcc_unreachable() ?


More information about the Gcc-bugs mailing list