public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vladimir.fuka at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
Date: Sat, 02 Apr 2022 16:39:05 +0000 [thread overview]
Message-ID: <bug-105138-4-vYgBjGcZwm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105138-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #2 from Vladimir Fuka <vladimir.fuka at gmail dot com> ---
As mentioned, the correct function is called in case everything is REAL
a = floor(5.0)
print *, a
contains
RECURSIVE FUNCTION FLOOR(Z) RESULT(RES)
REAL,INTENT(IN) :: Z
REAL :: RES
if (z>0) then
RES = FLOOR(Z - 1)
else
RES = 0
end if
END FUNCTION FLOOR
end
> gfortran-12 shadow.f90
> ./a.out
0.00000000
next prev parent reply other threads:[~2022-04-02 16:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 16:21 [Bug fortran/105138] New: " 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-105138-4-vYgBjGcZwm@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).