Hi, there must be some funny screw-up in the parser that shows up under very special circumstances. Compile the example below with debugging. There must *not* be any lines before the "subroutine" in that file, otherwise the ICE does not show up.
% gfortran -c -g gfc-dbg-bug.f90 gfc-dbg-bug.f90: In function 'gfc_debug_bug': gfc-dbg-bug.f90:-2: internal compiler error: in final_scan_insn, at final.c:1843 Here's the code: subroutine gfc_debug_bug (n,m,k,ax,bx,c) implicit none integer :: n, m integer :: k(n+m) real :: ax(:), bx(n), c(n+m) integer :: i real :: f i = k(n) f = c(n) f = bx(n) f = ax(n) end subroutine gfc_debug_bug ! ! Compile the above as follows: ! % gfortran -c -g gfc-dbg-bug.f90 ! gfc-dbg-bug.f90: In function 'gfc_debug_bug': ! gfc-dbg-bug.f90:-2: internal compiler error: in final_scan_insn, at final.c:1843 ! ! Adding a line (even an empty one) before "subroutine" resolves the bug... Cheers, -ha -- Summary: gfortran: ICE in final_scan_insn, at final.c:1843 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anlauf at hep dot tu-darmstadt dot de CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19195