https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102579

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, so the idea is that we want to avoid re-ordering volatile accesses even if
they do not alias.  Note the global var case is handled because we're going the
mark_all_reaching_defs_necessary way here but the
mark_all_reaching_defs_necessary_1 worker has the special-case

  /* We want to skip statments that do not constitute stores but have
     a virtual definition.  */
  if (gcall *call = dyn_cast <gcall *> (def_stmt))
    {
...
      if (callee != NULL_TREE
          && (DECL_IS_REPLACEABLE_OPERATOR_NEW_P (callee)
              || DECL_IS_OPERATOR_DELETE_P (callee))
          && gimple_call_from_new_or_delete (call))
        return false;

which the mark_aliased_reaching_defs_necessary_1 worker has not.

Reply via email to