https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803
--- Comment #2 from Aurelien Jarno <aurelien at aurel32 dot net> --- (In reply to James Cowgill from comment #1) > Here's another testcase which is reduced a bit further using creduce. It > requires -O2 to trigger the bug (but that may be unrelated). I reported it as a miscompilation with -O1, as at least in the clamav case, the bug is not reproducible with -O0, but is reproducible with both -O1 and -O2. But it seems this bug is quite dependent on the surrounding code, so my guess is that the issue is not triggered by a specific optimization.