tree-optimization/94963 - avoid bogus uninit warning with store-motion
Eliding the load for store-motion causes an uninitialized variable
flowing into the loop, conditionally initialized and used. The
uninit warning cannot relate the flag used to guard the initialization
and use with the actual initialization so the following robustifies
the previous approach of marking the conditional store as not to
be warned on by instead initializing the variable on loop entry
from an uninitialized variable we mark as not to be warned for.
2020-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/94963
* tree-ssa-loop-im.c (execute_sm_if_changed): Remove
no-warning marking of the conditional store.
(execute_sm): Instead mark the uninitialized state
on loop entry to be not warned about.
* gcc.dg/pr94963.c: New testcase.