Bug#963564: gfortran: Internal error when processing pFUnit generated files with --coverage
Package: gfortran-10
Version: 10.1.0-3
Control: forwarded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95847
Dear maintainers,
copying https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95847 for your
convenience:
With gcc 9 and 10, compiling the attached file with coverage info raises
an internal error:
$ gfortran-10 -c --coverage funit-bug.f90
during IPA pass: profile
funit-bug.f90:8:0:
8 | use foo
|
internal compiler error: in coverage_begin_function, at coverage.c:656
0x7f6c0275ae0a __libc_start_main
../csu/libc-start.c:308
[…]
$ gfortran-10 --version
GNU Fortran (Debian 10.1.0-3) 10.1.0
[…]
$ gfortran-9 --version
GNU Fortran (Debian 9.3.0-14) 9.3.0
This does not happen with gfortran-8, so it is a regression:
$ gfortran-8 -c --coverage funit-bug.f90
$ gfortran-8 --version
GNU Fortran (Debian 8.4.0-4) 8.4.0
System is Debian 11 testing.
The attached file is derived from a pFUnit generated file where this was
originally observed <https://github.com/Goddard-Fortran-Ecosystem/pFUnit>.
module foo
contains
subroutine sbr()
end subroutine sbr
end module foo
function foo_suite() result(suite)
use foo
integer :: bar
integer :: res
res = bar(sbr)
end function foo_suite
Reply to: