This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79312] Empty array in assignment not correctly type-checked
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jul 2017 18:27:50 +0000
- Subject: [Bug fortran/79312] Empty array in assignment not correctly type-checked
- Auto-submitted: auto-generated
- References: <bug-79312-4@http.gcc.gnu.org/bugzilla/>
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;
}