[Bug fortran/79312] Empty array in assignment not correctly type-checked

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 24 18:27:00 GMT 2017


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The problem appears to be at the top of gfc_convert_type_warn:

  /* NULL and zero size arrays get their type here.  */
  if (expr->expr_type == EXPR_NULL
      || (expr->expr_type == EXPR_ARRAY && expr->value.constructor == NULL))
    {
      /* Sometimes the RHS acquire the type.  */
      expr->ts = *ts;
      return true;
    }


More information about the Gcc-bugs mailing list