This ICE happens after the error message with $ cat gen.f90 module generic interface foo module procedure foo_real end interface foo contains subroutine foo_real(a) real :: a end subroutine foo_real end module generic program main use generic call foo(1) end program main $ gfortran -fdump-parse-tree gen.f90
Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4) procedure name = generic symtree: foo Ambig 0 symbol foo (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC) Generic interfaces: foo_real symtree: generic Ambig 0 symbol generic (UNKNOWN 0)(MODULE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC) symtree: foo_real Ambig 0 symbol foo_real (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS MODULE-PROC SUBROUTINE) Formal arglist: a CONTAINS Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4) procedure name = foo_real symtree: foo_real Ambig 0 from namespace generic symtree: a Ambig 0 symbol a (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC DUMMY) In file gen.f90:12 call foo(1) 1 Error: Generic subroutine 'foo' at (1) is not an intrinsic subroutine Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4) procedure name = MAIN__ symtree: generic Ambig 0 symbol generic (UNKNOWN 0)(MODULE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC USE-ASSOC) symtree: MAIN__ Ambig 0 symbol MAIN__ (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT PUBLIC UNKNOWN-PROC SUBROUTINE) symtree: foo Ambig 0 symbol foo (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC USE-ASSOC) Generic interfaces: foo_real symtree: foo_real Ambig 0 symbol foo_real (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS MODULE-PROC USE-ASSOC SUBROUTINE) Formal arglist: a Formal namespace Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4) procedure name = foo_real symtree: @0 Ambig 0 symbol a (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC DUMMY USE-ASSOC) symtree: main Ambig 0 symbol main (UNKNOWN 0)(PROGRAM UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC) gen.f90:3: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE with -fdump-parse-tree after error Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: minor Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27320