https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95847

            Bug ID: 95847
           Summary: Internal error when processing pFUnit generated files
                    with --coverage
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olebole at debian dot org
  Target Milestone: ---

Created attachment 48776
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48776&action=edit
Source file that reproduces the bug

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>.

Reply via email to