This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77879] [7 Regression] mpd gets miscompiled since r235622
- 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: Thu, 06 Oct 2016 11:25:14 +0000
- Subject: [Bug tree-optimization/77879] [7 Regression] mpd gets miscompiled since r235622
- Auto-submitted: auto-generated
- References: <bug-77879-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77879
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 39763
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39763&action=edit
patch
<bb 24>:
_73 = MEM[(long unsigned int *)&home + 8B];
_74 = MEM[(char * *)&home];
D.32906 = PathTraitsFS::Build (_74, _73, ".config", 7); [return slot
optimization]
<bb 25>:
MEM[(struct _Alloc_hider *)&fallback]._M_p = &MEM[(struct basic_string
*)&fallback].D.17830._M_local_buf;
_76 = MEM[(char * *)&D.32906];
if (&D.32906.D.17830._M_local_buf == _76)
goto <bb 26>;
else
goto <bb 27>;
this is the condition that is optimized. _76 points to nonlocal/escaped.
Looks like a PTA bug, mishandled RSO in some way. Ah, RSO handling is missing
from
pure/const fn handling.
Can you try if the attached fixes the issue?