http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55874
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-01-04 Ever Confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-04 12:14:51 UTC --- It figures the location from <bb 7>: # res_2 = PHI <[t.c : 4:12] 0(4), [t.c : 10:4] res_1(5)> [t.c : 14:3] return res_2; where we ended up copy-/const-propagating 0 and r. Note that the PHI argument has the correct location. Confirmed. We do: uninit_op = gimple_phi_arg_def (phi, MASK_FIRST_SET_BIT (uninit_opnds)); if (SSA_NAME_VAR (uninit_op) == NULL_TREE) return; warn_uninit (OPT_Wmaybe_uninitialized, uninit_op, SSA_NAME_VAR (uninit_op), SSA_NAME_VAR (uninit_op), "%qD may be used uninitialized in this function", uninit_use_stmt); that ends up warning at uninit_use_stmt. Not sure if we want to warn about the other location (or how well that would play out).