------- Comment #3 from janus at gcc dot gnu dot org 2009-11-15 14:24 ------- (In reply to comment #2) > internal compiler error: in gfc_walk_variable_expr, at > fortran/trans-array.c:6308
The ICE goes away when adding this: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 154188) +++ gcc/fortran/resolve.c (working copy) @@ -1321,6 +1321,8 @@ resolve_actual_arglist (gfc_actual_arglist *arg, p e->rank = comp->as->rank; e->expr_type = EXPR_FUNCTION; } + if (gfc_resolve_expr (e) == FAILURE) + return FAILURE; goto argument_list; } The patch in comment #2 however triggers the following regressions: FAIL: gfortran.dg/proc_ptr_comp_12.f90 -O0 (test for excess errors) FAIL: gfortran.dg/proc_ptr_comp_18.f90 -O0 (test for excess errors) FAIL: gfortran.dg/proc_ptr_comp_19.f90 -O0 (test for excess errors) FAIL: gfortran.dg/proc_ptr_comp_2.f90 -O0 (test for excess errors) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42045