public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
@ 2022-04-02 16:21 vladimir.fuka at gmail dot com
  2022-04-02 16:33 ` [Bug fortran/105138] " vladimir.fuka at gmail dot com
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: vladimir.fuka at gmail dot com @ 2022-04-02 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105138
           Summary: [7,8,9,10,11,12,F95] Bogus error when function name
                    does not shadow an intrinsic when RESULT clause is
                    used
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com
  Target Milestone: ---

Reported at Stackoverflow by Denis Cousineau
https://stackoverflow.com/questions/71718480/gfortran-compiler-error-for-a-code-from-reputable-source/71718729?noredirect=1#comment126746262_71718729

RECURSIVE FUNCTION LOG_GAMMA(Z) RESULT(RES)
  COMPLEX,INTENT(IN) :: Z
  COMPLEX  :: RES
  RES = LOG_GAMMA(Z);
END FUNCTION LOG_GAMMA

> gfortran-12 shadow.f90 
shadow.f90:4:18:

    4 |   RES = LOG_GAMMA(Z);
      |                  1
Error: ‘x’ argument of ‘log_gamma’ intrinsic at (1) must be REAL


When the argument type agrees, the correct function is called.

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

end of thread, other threads:[~2022-05-16 20:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
2022-04-02 16:33 ` [Bug fortran/105138] " vladimir.fuka at gmail dot com
2022-04-02 16:39 ` vladimir.fuka at gmail dot com
2022-04-02 16:49 ` kargl at gcc dot gnu.org
2022-04-02 16:54 ` kargl at gcc dot gnu.org
2022-04-02 17:07 ` vladimir.fuka at gmail dot com
2022-04-02 17:15 ` anlauf at gcc dot gnu.org
2022-04-02 19:03 ` kargl at gcc dot gnu.org
2022-04-02 23:21 ` kargl at gcc dot gnu.org
2022-04-03 20:27 ` anlauf at gcc dot gnu.org
2022-04-03 21:23 ` sgk at troutmask dot apl.washington.edu
2022-04-04 19:05 ` anlauf at gcc dot gnu.org
2022-04-05 17:38 ` cvs-commit at gcc dot gnu.org
2022-04-05 17:46 ` [Bug fortran/105138] [7,8,9,10,11,F95] " anlauf at gcc dot gnu.org
2022-04-10 18:55 ` cvs-commit at gcc dot gnu.org
2022-04-10 18:57 ` [Bug fortran/105138] [7,8,9,10,F95] " anlauf at gcc dot gnu.org
2022-05-16 19:40 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:51 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:53 ` anlauf at gcc dot gnu.org
2022-05-16 20:38 ` anlauf 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).