public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/98890] New: ICE on reference to module function
@ 2021-01-29 13:34 jakub at gcc dot gnu.org
  2021-01-29 13:42 ` [Bug fortran/98890] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-29 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98890
           Summary: ICE on reference to module function
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

gfortran ICEs on the following testcase:

module foo
contains
  real function bar(x)
    real :: x(2,2)
    bar=baz*x(1,1)
  end function bar      
  real function baz(x)
    real :: x(2,2)
    baz=x(1,1)
  end function baz      
end module foo

Doesn't say anything even with implicit none, so maybe it is ok that baz lookup
gives the module function rather than a local variable, but shouldn't something
complain that it refers to the module function in an invalid way (rather than
say calling it)?  Originally this was reported due to a typo (the baz* should
have been bar* ).
If baz returns some incompatible type such as integer, then an error is
diagnosed.

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

end of thread, other threads:[~2021-02-19 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 13:34 [Bug fortran/98890] New: ICE on reference to module function jakub at gcc dot gnu.org
2021-01-29 13:42 ` [Bug fortran/98890] " jakub at gcc dot gnu.org
2021-02-04 11:03 ` dominiq at lps dot ens.fr
2021-02-05 11:43 ` burnus at gcc dot gnu.org
2021-02-19 16:10 ` burnus at gcc dot gnu.org
2021-02-19 16:47 ` jvdelisle at gcc dot gnu.org
2021-02-19 17:22 ` jvdelisle 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).