https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82934
--- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Fri, Dec 08, 2017 at 01:14:44AM +0000, sgk at troutmask dot apl.washington.edu wrote: > > I don't know how I missed F2008:C631 > > C631 (R626) A type-param-value in a type-spec shall be an asterisk if > and only if each allocate-object is a dummy argument for which the > corresponding type parameter is assumed. > > This is going to make the fix for 83318 real ugly. > character(len=42), allocatable :: foo character(len=22), allocatable :: foofoo call alloc( foo , foofoo) if (len(foo) .ne. 42) call abort if (len(foofoo) .ne. 22) call abort contains subroutine alloc( bar, barbar ) character(len=*), allocatable :: bar character(len=22), allocatable :: barbar allocate(character(len=*) :: bar , barbar) ! <= Here! end subroutine end gfcx z a.f90 f951: internal compiler error: Segmentation fault 0xb5af0f crash_signal ../../gcc/gcc/toplev.c:325 0x75eb9a gfc_dep_compare_expr(gfc_expr*, gfc_expr*) ../../gcc/gcc/fortran/dependency.c:363 0x741636 resolve_allocate_expr ../../gcc/gcc/fortran/resolve.c:7487 0x741636 resolve_allocate_deallocate ../../gcc/gcc/fortran/resolve.c:7879 0x733115 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/gcc/fortran/resolve.c:11314 0x735b4f resolve_codes ../../gcc/gcc/fortran/resolve.c:16433