[Bug middle-end/64614] bogus used initialized warning (in gcc 4.9.2); switch statement versus &
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 16 10:31:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64614
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 34461
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34461&action=edit
preliminary patch
I think the uninit pass doesn't even try to handle switch case input conditions
(convert_control_dep_chain_into_preds). Nor does predicate handling deal with
bar & 3 predicates.
Preliminary patch attached - still needs to handle the default case - but
it seems we don't warn about the return value with the patch.
With the patch:
[CHECK] Found def edge 1 in tmp_1 = PHI <tmp_6(D)(3), baz_7(D)(8)>
[BEFORE SIMPLICATION -- [USE]:
MEM[(char *)tmp_1 + 11B] = 15;
is guarded by :
bar_4(D) == 2
[BEFORE SIMPLICATION -- [DEF]:
tmp_1 = PHI <tmp_6(D)(3), baz_7(D)(8)>
is guarded by :
_5 != 0
[AFTER NORMALIZATION -- [DEF]:
tmp_1 = PHI <tmp_6(D)(3), baz_7(D)(8)>
is guarded by :
bar_4(D) & 3
More information about the Gcc-bugs
mailing list