http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55255
Bug #: 55255 Summary: Compiler segmentation fault Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: critical Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: everettyou.inter...@gmail.com * version: 4.6.2 20111019 (prerelease) (GCC) * system type: Mac OS 10.7.4 * built command: gfortran -o BUG BUG.f90 -save-temps -J ./build * bug behavior: compiler throws internal compiler error: Segmentation fault * source files: BUG.f90 ! ----------------------------------- MODULE MY_ARRAY TYPE ARRAY REAL, ALLOCATABLE :: VALS(:) END TYPE ARRAY CONTAINS FUNCTION MAKE_ARRAY(X) RESULT(Y) REAL, INTENT(IN) :: X(:) TYPE(ARRAY) :: Y Y%VALS = X END FUNCTION MAKE_ARRAY SUBROUTINE PRINT_ARRAY(Y) TYPE(ARRAY), INTENT(IN) :: Y PRINT *, Y%VALS END SUBROUTINE PRINT_ARRAY END MODULE MY_ARRAY PROGRAM MAIN USE MY_ARRAY CALL PRINT_ARRAY(MAKE_ARRAY((/1.,2./))) END PROGRAM MAIN ! ----------------------------------