This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/85233] Incorrect -Wmaybe-uninitialized with -fpartial-inlining -finline-small-functions
- 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, 06 Apr 2018 08:46:19 +0000
- Subject: [Bug ipa/85233] Incorrect -Wmaybe-uninitialized with -fpartial-inlining -finline-small-functions
- Auto-submitted: auto-generated
- References: <bug-85233-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85233
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-04-06
CC| |jamborm at gcc dot gnu.org,
| |marxin at gcc dot gnu.org,
| |mliska at suse dot cz
Component|c |ipa
Blocks| |24639
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It needs intraprocedural analysis to prove that x is always initialized if
f returns nonzero. That's fragile and in the presence of partial inlining
it seems to break.
So what we are missing is IPA propagation of the single constant return
value of f.part.0. After fnsplit:
f.part.0 ()
{
...
<bb 5> [100.00%]:
# _3 = PHI <0(4)>
return _3;
}
h ()
{
int D.1847;
...
<bb 6> [16.50%]:
_11 = f.part.0 ();
if (_11 == 0)
goto <bb 8>; [46.00%]
else
we fail to optimize this conditional. I realize we don't have return
jump-functions but if the single return value can be easily proved
by IPA-CP we could constant propagate that during its transform phase?
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues