https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92321
Bug ID: 92321 Summary: GCC 9.2.0 ICE: fexternal-blas with optimization Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: bugreports.nwukie at gmail dot com Target Milestone: --- I experience an ICE with gfortran 9.2.0 compiling a matmul call within a subroutine using -fexternal-blas and -O3. Compiling without -fexternal-blas the compilation completes without failing. It looks like there were some recent modifications related to matmul optimizations that went into GCC9 as mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29550 INPUT: (test.f90) module mod_badmatmul implicit none contains subroutine test(c) real, intent(inout) :: c(3,3) real :: a(3,3), b(3,3) c = matmul(a, b) end subroutine test end module mod_badmatmul program main use mod_badmatmul, only: test implicit none real :: a(3,3) call test(a) end program main COMPILE LINE: gfortran -fexternal-blas -O3 test.f90 OUTPUT: f951: internal compiler error: in gfc_enforce_clean_symbol_state, at fortran/symbol.c:4273 libbacktrace could not find executable to open SYSTEM: OSX 10.14.6 Target: x86_64-apple-darwin18.7.0 Configured with: ./configure --enable-languages=c,c++,fortran Thread model: posix gcc version 9.2.0 (GCC) GNU Fortran (GCC) version 9.2.0 (x86_64-apple-darwin18.7.0) compiled by GNU C version 9.2.0, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP GNU Fortran2008 (GCC) version 9.2.0 (x86_64-apple-darwin18.7.0) compiled by GNU C version 9.2.0, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP