Compiling the following code results in an internal compiler error: > gfortran-4.0 buggy.f90 -o buggy.o buggy.f90: In function 'testsub': buggy.f90:5: 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. > cat buggy.f90 module test contains subroutine testsub(lmax, idxorb) integer, intent(in) :: lmax(:) integer, intent(in) :: idxorb(-maxval(lmax):,0:) print *, idxorb end subroutine testsub end module test
Actually it is the missing upper bound which is causing the segfault, this is a dup of bug 19358. *** This bug has been marked as a duplicate of 19358 ***