https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82129
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Not yet analyzed but I see LIM performs store-motion on <bb 8> [0.00%] [count: INV] [loop 5 header]: - *h5_26(D) = tv_24(D); + h5__lsm.7_18 = tv_24(D); where I think stores from undefined SSA names could be turned into CLOBBERs. "Fixes" the testcase. Index: gcc/gimple-fold.c =================================================================== --- gcc/gimple-fold.c (revision 252002) +++ gcc/gimple-fold.c (working copy) @@ -410,6 +410,16 @@ fold_gimple_assign (gimple_stmt_iterator else if (DECL_P (rhs)) return get_symbol_constant_value (rhs); + + else if (TREE_CODE (rhs) == SSA_NAME + && SSA_NAME_IS_DEFAULT_DEF (rhs) + && ! ssa_defined_default_def_p (rhs) + && gimple_store_p (stmt)) + { + tree clobber = build_constructor (TREE_TYPE (rhs), NULL); + TREE_THIS_VOLATILE (clobber) = true; + return clobber; + } } break;