public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vahtras at pdc dot kth dot se" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/34260] New: present returns wrong value of optional variables Date: Wed, 28 Nov 2007 09:37:00 -0000 [thread overview] Message-ID: <bug-34260-13252@http.gcc.gnu.org/bugzilla/> (raw) the PRESENT test of an optional variable returns TRUE in both of these calls $ cat c.F; gfortran c.F ; ./a.out PROGRAM MAIN REAL A INTEGER I CALL SUB(A,I) CALL SUB(A) END SUBROUTINE SUB(A,I) REAL :: A INTEGER, OPTIONAL :: I IF (PRESENT(I)) THEN PRINT *,'YES' ELSE PRINT *,'NO' END IF END YES YES c.f intel gives $ ifort c.F ; ./a.out YES NO gfortran behaves correctly with an explicit INTERFACE, but that should not be required (as far as I know) Olav -- Summary: present returns wrong value of optional variables Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vahtras at pdc dot kth dot se GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34260
next reply other threads:[~2007-11-28 9:37 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-11-28 9:37 vahtras at pdc dot kth dot se [this message] 2007-11-28 10:33 ` [Bug fortran/34260] " terry at chem dot gu dot se 2007-11-28 13:22 ` vahtras at kth dot se 2007-11-28 13:54 ` [Bug fortran/34260] Give warning if procedure with implicit interface is called with different arguments burnus at gcc dot gnu dot org 2010-05-01 20:35 ` dfranke at gcc dot gnu dot org 2010-05-25 18:10 ` dfranke at gcc dot gnu dot org 2010-05-25 18:11 ` dfranke at gcc dot gnu dot org 2010-07-18 20:50 ` dfranke at gcc dot gnu dot org 2010-07-18 21:15 ` dfranke at gcc dot gnu dot 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-34260-13252@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).