recursive function causes ICE -------------- program r implicit none integer :: i=5 print fact(i) stop end
recursive function fact(n) result(nfact) implicit none integer, intent(in) :: n integer :: nfact if (n>0) then nfact = n * fact(n-1) else nfact = 1 end if end function fact end -------------------- gfortran -vUsing built-in specs. Target: i586-pc-linux-gnu Configured with: /tmp/gcc-4.0.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --with-gnu-as --with-gnu-ld --verbose --enable-languages=c,c++,f95 --disable-nls --disable-rpath --build=i586-pc-linux-gnu --target=i586-pc-linux-gnu --host=i586-pc-linux-gnu Thread model: posix gcc version 4.0.3 -------------------- even if the code is invalid, it should not result in an ICE -- Summary: recursive fuction causes ICE Product: gcc Version: 4.0.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: buraphalinuxserver at gmail dot com GCC build triplet: i586-linux-gnu GCC host triplet: i586-linux-gnu GCC target triplet: i586-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28237