http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45794
Summary: internal compiler error: Segmentation fault Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: neil.n.carl...@gmail.com The following code causes an internal compiler error with the current trunk: $ gfortran --version GNU Fortran (GCC) 4.6.0 20100924 (experimental) subroutine foo (vector, mask) real :: vector(:) logical, optional :: mask(:) integer :: loc(1) if (present(mask)) then loc = maxloc(vector, mask) end if end subroutine $ gfortran -c bug3.f90 bug3.f90: In function ‘foo’: bug3.f90:6:0: internal compiler error: Segmentation fault Note that this bug does not exist in 4.4 (or 4.5 I think).