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

anlauf at gcc dot gnu.org changed:

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

--- Comment #29 from anlauf at gcc dot gnu.org ---
(In reply to janus from comment #24)
>  * the NULL case in comment 16 is rejected

This is fixed by:

diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc
index fc4fe662eab..ad99285d513 100644
--- a/gcc/fortran/interface.cc
+++ b/gcc/fortran/interface.cc
@@ -3409,6 +3425,9 @@ gfc_compare_actual_formal (gfc_actual_arglist **ap,
gfc_formal_arglist *formal,
       if (f->sym->ts.type == BT_CLASS)
        goto skip_size_check;

+      if (a->expr->expr_type == EXPR_NULL || a->expr->ts.type == BT_UNKNOWN)
+       goto skip_size_check;
+
       actual_size = get_expr_storage_size (a->expr);
       formal_size = get_sym_storage_size (f->sym);
       if (actual_size != 0 && actual_size < formal_size

Reply via email to