public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102460] New: fortran internal compile error in coverage.c
@ 2021-09-22 18:01 davidsch at fedoraproject dot org
  2021-09-23 12:26 ` [Bug fortran/102460] " davidsch at fedoraproject dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: davidsch at fedoraproject dot org @ 2021-09-22 18:01 UTC (permalink / raw)
  To: 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
@ 2021-09-23 12:26 ` davidsch at fedoraproject dot org
  2021-09-23 20:10 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: davidsch at fedoraproject dot org @ 2021-09-23 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Bold <davidsch at fedoraproject dot org> ---
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
  2021-09-23 12:26 ` [Bug fortran/102460] " davidsch at fedoraproject dot org
@ 2021-09-23 20:10 ` anlauf at gcc dot gnu.org
  2021-09-23 20:14 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-23 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to fail|                            |12.0
   Last reconfirmed|                            |2021-09-23
     Ever confirmed|0                           |1

--- Comment #2 from anlauf at gcc dot gnu.org ---
Confirmed.

The issue disappears if I comment out the line

      ENTRY ENTRY1()

I also do not see it on 11-branch, but that may be related to my local build.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
  2021-09-23 12:26 ` [Bug fortran/102460] " davidsch at fedoraproject dot org
  2021-09-23 20:10 ` anlauf at gcc dot gnu.org
@ 2021-09-23 20:14 ` anlauf at gcc dot gnu.org
  2021-09-27 13:57 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-23 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from anlauf at gcc dot gnu.org ---
Reduced testcase:

MODULE MOD2
  IMPLICIT NONE
CONTAINS                
  SUBROUTINE SUB1()
  ENTRY ENTRY1()
  END SUBROUTINE SUB1
END MODULE MOD2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
                   ` (2 preceding siblings ...)
  2021-09-23 20:14 ` anlauf at gcc dot gnu.org
@ 2021-09-27 13:57 ` marxin at gcc dot gnu.org
  2021-09-27 13:58 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-27 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to David Bold from comment #1)
> 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

It's very likely a front-end issue which is described in the warning message.
What's meaning of the 'ENTRY ENTRY1()' directive?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
                   ` (3 preceding siblings ...)
  2021-09-27 13:57 ` marxin at gcc dot gnu.org
@ 2021-09-27 13:58 ` marxin at gcc dot gnu.org
  2021-09-27 15:35 ` davidsch at fedoraproject dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-27 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
> 
> I also do not see it on 11-branch, but that may be related to my local build.

Yes, I made a papering over it in the GCC-11 branch
(g:5f00ef3bc724e22628fdfd81855013115d115ebe).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
                   ` (4 preceding siblings ...)
  2021-09-27 13:58 ` marxin at gcc dot gnu.org
@ 2021-09-27 15:35 ` davidsch at fedoraproject dot org
  2021-10-01  9:40 ` marxin at gcc dot gnu.org
  2021-11-04 10:11 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: davidsch at fedoraproject dot org @ 2021-09-27 15:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from David Bold <davidsch at fedoraproject dot org> ---
> 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 ...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
                   ` (5 preceding siblings ...)
  2021-09-27 15:35 ` davidsch at fedoraproject dot org
@ 2021-10-01  9:40 ` marxin at gcc dot gnu.org
  2021-11-04 10:11 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-01  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks! So it's really a Fortran issue

(gdb) p startloc.line
$8 = 7
(gdb) p end_line
$9 = 6

Can please anybody from Fortran FE guys help me here?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/102460] fortran internal compile error in coverage.c
  2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
                   ` (6 preceding siblings ...)
  2021-10-01  9:40 ` marxin at gcc dot gnu.org
@ 2021-11-04 10:11 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-04 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot gnu.org

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Unassigning as it's a Fortran issue (where I asked at Fortran mailing list).

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-04 10:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 18:01 [Bug fortran/102460] New: fortran internal compile error in coverage.c davidsch at fedoraproject dot org
2021-09-23 12:26 ` [Bug fortran/102460] " davidsch at fedoraproject dot org
2021-09-23 20:10 ` anlauf at gcc dot gnu.org
2021-09-23 20:14 ` anlauf at gcc dot gnu.org
2021-09-27 13:57 ` marxin at gcc dot gnu.org
2021-09-27 13:58 ` marxin at gcc dot gnu.org
2021-09-27 15:35 ` davidsch at fedoraproject dot org
2021-10-01  9:40 ` marxin at gcc dot gnu.org
2021-11-04 10:11 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).