https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40635
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2009-07-06 13:19:06 |2017-3-2 Known to fail| |6.3.0, 7.0.1 --- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed with GCC 6/7 at -O[1s]: t.c: In function ‘server_init’: t.c:38:6: warning: ‘s42’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (sockt_rd < 0) ^ the location is from the use of _16: <bb 2> [14.30%]: [t.c:16:6] hp_7 = gethostbyname (machine_3(D)); [t.c:18:13] addr_8 = [t.c:18:17] hp_7->h_addr_list; [t.c:18:32] _32 = *addr_8; [t.c:18:3] if (_32 != 0B) goto <bb 10>; [95.00%] else goto <bb 11>; [5.00%] <bb 11> [0.72%]: <bb 9> [5.23%]: # s42_21 = PHI <s42_18(D)(11), [t.c:19:11] s42_9(13)> goto <bb 8>; [100.00%] <bb 8> [14.26%]: # _16 = PHI <[t.c:21:9] -1(12), [t.c:28:12] -1(7), [t.c:19:11] s42_9(15), s42_21(9)> [t.c:37:3] foo (); [t.c:38:6] _28 = _16 < 0; you can see how the PHI arg coming from BB 9 lacks a location. We are appearantly not very good in preserving locations of return stmts when inlining.