http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47569
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code CC| |burnus at gcc dot gnu.org Summary|gfortran does not detect |[4.3/4.4/4.5/4.6 |that the parameters for |Regression] gfortran does |passing a partial string to |not detect that the |a subroutine are incorrect. |parameters for passing a | |partial string to a | |subroutine are incorrect Known to fail| |4.4.4, 4.6.0 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-01 11:03:57 UTC --- ICE with gfortran 4.3 to 4.6; compiled with gfortran 4.1. Other compilers (NAG, g95, ifort) do not show any compile-time warning/error. ==21718== Invalid read of size 4 ==21718== at 0x4F29A5: compare_actual_formal (interface.c:1689) ==21718== by 0x4F2D5D: gfc_procedure_use (interface.c:2727) ==21718== by 0x53A825: resolve_call (resolve.c:3508) /* Not an array element. */ if (formal->ts.type == BT_CHARACTER && (ref == NULL || (actual->expr_type == EXPR_VARIABLE && (actual->symtree->n.sym->as->type == AS_ASSUMED_SHAPE || actual->symtree->n.sym->attr.pointer)))) The check does not make sense: For "ref->NULL" one cannot assume that it is an array ref - it could also be character ref or a component ref.