Index: fortran/primary.c =================================================================== --- fortran/primary.c (revision 228061) +++ fortran/primary.c (working copy) @@ -2703,8 +2703,7 @@ gfc_match_structure_constructor (gfc_sym e->symtree = symtree; e->expr_type = EXPR_FUNCTION; - gcc_assert (sym->attr.flavor == FL_DERIVED - && symtree->n.sym->attr.flavor == FL_PROCEDURE); + gcc_assert (sym->attr.flavor == FL_DERIVED); e->value.function.esym = sym; e->symtree->n.sym->attr.generic = 1; Index: testsuite/gfortran.dg/pr67616.f90 =================================================================== --- testsuite/gfortran.dg/pr67616.f90 (revision 0) +++ testsuite/gfortran.dg/pr67616.f90 (working copy) @@ -0,0 +1,13 @@ +! { dg-do compile } +! PR fortran/67616 +! Original code contributed by Gerhard Steinmetz +program p + type t + end type + type(t) :: y + data y /t()/ + block + type(t) :: x + data x /t()/ ! Prior to patch, this would ICE. + end block +end