https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79108
Bug ID: 79108 Summary: [7 Regression] ICE on some fortran code with -flto -Ofast Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: GC, ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take the following fortran 90 code: MODULE Errorcheck_mod CONTAINS SUBROUTINE Check_open(ios, outputstr, errortype) character(len=*), intent(in) :: outputstr if (ios > 0 .AND. errortype == FATAL) then write(*,*) 'The value of ios was:', ios end if END SUBROUTINE Check_open END MODULE Errorcheck_mod ---- CUT ---- Compile it like: gfortran -nostdlib -r -Ofast -flto --param ggc-min-expand=0 --param ggc-min-heapsize=0 errorcheck.f90 You get the following ICE: lto1: internal compiler error: in ipa_get_type, at ipa-prop.h:448 0x107c737 ipa_get_type ../../gcc/gcc/ipa-prop.h:448 0x107c737 propagate_constants_across_call ../../gcc/gcc/ipa-cp.c:2259 0x10810f7 propagate_constants_topo ../../gcc/gcc/ipa-cp.c:3170 0x10810f7 ipcp_propagate_stage ../../gcc/gcc/ipa-cp.c:3267 0x1082173 ipcp_driver ../../gcc/gcc/ipa-cp.c:4997 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: fatal error: gfortran returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status