This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/70646] [4.9/5/6 Regression] Corrupt truncated function
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Apr 2016 11:52:33 +0000
- Subject: [Bug ipa/70646] [4.9/5/6 Regression] Corrupt truncated function
- Auto-submitted: auto-generated
- References: <bug-70646-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Josh Poimboeuf from comment #13)
> So if I understand correctly, some reachable code is incorrectly getting
> marked unreachable and then getting discarded.
>
> 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.
> If so, that should make it possible for objtool to reliably detect the bug.