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() ?