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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
  /* Protect the entire array initialization so that we can destroy
     the partially constructed array if an exception is thrown.
     But don't do this if we're assigning.  */
  if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
      && from_array != 2)
    {
    ....
   }
```

This most likely should add something like:
```
else if (from_array != 2)
{
      /* Make sure the destructor is callable.  */
      if (type_build_dtor_call (type))
        {
          tmp = build_delete (loc, ptype, base, sfk_complete_destructor,
                             
LOOKUP_NORMAL|LOOKUP_DESTRUCTOR|LOOKUP_NONVIRTUAL,
                              1, complain);
          if (tmp == error_mark_node)
            return error_mark_node;
        }
}
```

Afterwards

Reply via email to