When there's volatile qualified stores we do not have to treat the
destination as pointing to ANYTHING. It's only when reading from
it that we want to treat the resulting pointers as pointing to ANYTHING.
PR tree-optimization/116785
* tree-ssa-structalias.cc (get_constraint_for_1): Only
volatile qualified reads produce ANYTHING.
}
case tcc_reference:
{
- if (TREE_THIS_VOLATILE (t))
+ if (!lhs_p && TREE_THIS_VOLATILE (t))
/* Fall back to anything. */
break;
}
case tcc_declaration:
{
- if (VAR_P (t) && TREE_THIS_VOLATILE (t))
+ if (!lhs_p && VAR_P (t) && TREE_THIS_VOLATILE (t))
/* Fall back to anything. */
break;
get_constraint_for_ssa_var (t, results, address_p);