[Bug ipa/70646] [4.9/5/6 Regression] Corrupt truncated function
jpoimboe at redhat dot com
gcc-bugzilla@gcc.gnu.org
Fri Apr 15 13:37:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646
--- Comment #17 from Josh Poimboeuf <jpoimboe at redhat dot com> ---
(In reply to Richard Biener from comment #14)
> (In reply to Josh Poimboeuf from comment #13)
> > Interestingly, the function's epilogue (frame pointer restore) and return
> > instruction are also getting discarded. Can you tell if that will always be
> > the case when this bug triggers?
>
> I don't think we can rely on that. The path could simply fall thru to
> a random instruction which is still inside the function. Say, if it was
>
> if (x)
> ...
> else
> ...
> foo ();
>
> then the arm marked unreachable would simply disappear.
I tried doing that by putting the offending wwn_to_u64() call in an if
statement, but then the bug disappeared.
In fact, adding *any* code before the call seems to make the bug disappear.
More information about the Gcc-bugs
mailing list