https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69965
Bug ID: 69965 Summary: ICE: tree check: expected tree that contains ‘typed’ structure, have ‘<invalid tree code>’ in gfc_get_character_type, at fortran/trans-types.c:1048 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With an abstract class dummy argument : $ cat z1.f90 module m type, abstract :: tab contains procedure(fab), deferred :: f end type type, extends(tab) :: t contains procedure :: f end type abstract interface function fab(x) result(z) import tab class(tab) :: x character(*) :: z end end interface contains function f(x) class(t) :: x character(1) :: f f = 'a' end subroutine s(x) class(tab) :: x print *, x%f() end end module $ gfortran-6 --version GNU Fortran (SUSE Linux) 6.0.0 20160202 (experimental) [trunk revision 233076] $ gfortran-6 -c z1.f90 z1.f90:30:0: print *, x%f() internal compiler error: Segmentation fault In approximately 3 out of 100 runs the error message is : internal compiler error: tree check: expected tree that contains ‘typed’ structure, have ‘<invalid tree code>’ in gfc_get_character_type, at fortran/trans-types.c:1048