[Bug fortran/102460] New: fortran internal compile error in coverage.c

2021-09-22 Thread davidsch at fedoraproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102460

Bug ID: 102460
   Summary: fortran internal compile error in coverage.c
   Product: gcc
   Version: 11.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: davidsch at fedoraproject dot org
  Target Milestone: ---

Created attachment 51495
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51495&action=edit
two source files and the compile commands to reproduce the issue

the exact version of GCC:
gcc-gfortran-11.2.1-1.fc34.x86_64
GNU Fortran (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)

the system type:
Fedora 34

the options given when GCC was configured/built:
Not sure, Fedoras default

the complete command line that triggers the bug:
f95 -ftest-coverage -save-temps -c MOD2.f

the compiler output (error messages, warnings, etc.):
during IPA pass: profile
MOD2.f:6:9:

6 |   USE MOD1,only : f1
  | ^
internal compiler error: in coverage_begin_function, at coverage.c:662
Please submit a full bug report,
with preprocessed source if appropriate.

the preprocessed file (*.i*) that triggers the bug:
No *.i* files are generated.

I have attached two source files and the compile commands as attachment.

PS: I have observed the same issue on debian with gcc 10, while gcc 8 works.
PPS: Without coverage instruction, no error is raised.

[Bug fortran/102460] fortran internal compile error in coverage.c

2021-09-23 Thread davidsch at fedoraproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102460

--- Comment #1 from David Bold  ---
I got around to compile the most recent version (git commit 2f2dcbe471) and
with that I get:

MOD2.f:15:72:

   15 |   END MODULE MOD2
  |   
^
Error: function starts on a higher line number than it ends
[-Werror=coverage-invalid-line-number]
f951: some warnings being treated as errors

[Bug fortran/102460] fortran internal compile error in coverage.c

2021-09-27 Thread davidsch at fedoraproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102460

--- Comment #6 from David Bold  ---
> What's meaning of the 'ENTRY ENTRY1()' directive?

It is an example, alternative entry point to the subroutine SUB1.

Here is some older documentation for the ENTRY directive:
https://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/Alternate-Entry-Points.html

Please excuse in case I got the question wrong ...