The following program gives an ICE, which is maybe not surprising as deferred-length components are not yet supported. internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2394 Expected: - Short term: Reject it ("sorry not yet implemented") - Long term: Support it. character(len=42), target, save :: A type :: t character(len=:), pointer :: P => A end type t type(T) :: X end
Created attachment 25902 [details] ICE with allocatable type component >> gfortran -c -std=f2008 -Wall -Wextra ehe.f03 ehe.f03: In function ‘ehe’: ehe.f03:18:0: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2394 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [ehe.o] Error 1
Author: burnus Date: Thu Dec 15 15:18:33 2011 New Revision: 182372 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182372 Log: 2011-12-15 Tobias Burnus <burnus@net-b.de> PR fortran/51550 PR fortran/47545 PR fortran/49050 PR fortran/51075 * resolve.c (resolve_fl_derived0): Print not-implemented error for deferred-length character components. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c
Author: burnus Date: Thu Dec 15 15:25:32 2011 New Revision: 182373 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182373 Log: 2011-12-15 Tobias Burnus <burnus@net-b.de> PR fortran/51550 PR fortran/47545 PR fortran/49050 PR fortran/51075 * resolve.c (resolve_fl_derived0): Print not-implemented error for deferred-length character components. Modified: branches/gcc-4_6-branch/gcc/fortran/ChangeLog branches/gcc-4_6-branch/gcc/fortran/resolve.c
The ICE is fixed - but deferred-length character components are not supported: Instead of an internal compiler error, one now gets a "not yet implemented" error. Its implementation of is now tracked at PR 51976. *** This bug has been marked as a duplicate of bug 51976 ***