public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59104] New: Wrong result with SIZE specification expression Date: Wed, 13 Nov 2013 07:33:00 -0000 [thread overview] Message-ID: <bug-59104-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59104 Bug ID: 59104 Summary: Wrong result with SIZE specification expression Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org James Van Buskirk found the following problem, https://groups.google.com/forum/#!topic/comp.lang.fortran/2RleGXz6-ew Result with GCC 4.8 + 4.9: size(f) = 1 size(y) = 2143476561 Result with GCC 4.5, 4.6 and 4.7: size(f) = 1 size(y) = 1 Expected result: size(f) = 1 size(y) = 2 module m1 implicit none integer, parameter :: dp = kind([double precision::]) contains recursive function f(x) integer, intent(in) :: x real(dp) f(x/2) integer y(size(f)+1) write(*,*) 'size(f) = ',size(f) write(*,*) 'size(y) = ',size(y) f = 0 end function f end module m1 program bug3 use m1 implicit none real y y = sum(f(2)) end program bug3
next reply other threads:[~2013-11-13 7:33 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-13 7:33 burnus at gcc dot gnu.org [this message] 2013-12-19 11:31 ` [Bug fortran/59104] " dominiq at lps dot ens.fr 2015-08-18 8:15 ` 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@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).