public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59104] Wrong result with SIZE specification expression Date: Thu, 19 Dec 2013 11:31:00 -0000 [thread overview] Message-ID: <bug-59104-4-vDmRxt6ZYK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59104-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59104 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-12-19 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Confirmed at r206105. Using result(res) as in module m1 implicit none integer, parameter :: dp = kind([double precision::]) contains recursive function f(x) result(res) integer, intent(in) :: x real(dp) res(x/2) integer y(size(res)+1) if (x==1) return write(*,*) 'size(f) = ',size(res) write(*,*) 'size(y) = ',size(y) res = f(x/2) end function f end module m1 program bug3 use m1 implicit none real y y = sum(f(8)) print *, y end program bug3 make the code working: size(f) = 4 size(y) = 5 size(f) = 2 size(y) = 3 size(f) = 1 size(y) = 2 0.00000000
next prev parent reply other threads:[~2013-12-19 11:31 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-13 7:33 [Bug fortran/59104] New: " burnus at gcc dot gnu.org 2013-12-19 11:31 ` dominiq at lps dot ens.fr [this message] 2015-08-18 8:15 ` [Bug fortran/59104] " fxcoudert at gcc dot gnu.org 2022-01-24 21:57 ` anlauf at gcc dot gnu.org 2024-05-22 7:46 ` pault at gcc dot gnu.org 2024-05-23 5:30 ` pault at gcc dot gnu.org 2024-06-04 21:51 ` pault at gcc dot gnu.org 2024-06-20 7:01 ` cvs-commit 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-59104-4-vDmRxt6ZYK@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: linkBe 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).