public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/28004] Warn if intent(out) dummy variable is not set
Date: Fri, 03 Nov 2006 19:59:00 -0000	[thread overview]
Message-ID: <20061103195947.15361.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28004-1719@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from burnus at gcc dot gnu dot org  2006-11-03 19:59 -------
> I think we should issue a warning but not an error, because you can write code
> that is [...]
Note that you should use "contains" for the code otherwise "foo" is regarded as
real function and the program does not compile.

g95 actually gives only a warning if the variable is not set at all, it does
not give a warning, if it is only set in the if branch. So does ifort. (NAG f95
and sunf95 don't give any warning neither with assigning it in the if branch or
not assigning it at all.)

Using -Wall gfortran states that the variable "x" is not used, but a default
warning that "A dummy argument with an explicit INTENT(OUT) declaration is not
given an explicit value." is more helpful.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28004


  parent reply	other threads:[~2006-11-03 19:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 20:18 [Bug fortran/28004] New: " tobias dot burnus at physik dot fu-berlin dot de
2006-06-13 19:48 ` [Bug fortran/28004] " pault at gcc dot gnu dot org
2006-06-14  9:25 ` tobias dot burnus at physik dot fu-berlin dot de
2006-11-02  9:47 ` fxcoudert at gcc dot gnu dot org
2006-11-03 19:59 ` burnus at gcc dot gnu dot org [this message]
2006-11-11 11:18 ` tkoenig at gcc dot gnu dot org
2007-07-03 21:00 ` dfranke at gcc dot gnu dot org
2007-07-03 21:06 ` dfranke at gcc dot gnu dot org
2007-07-08 22:41 ` dfranke at gcc dot gnu dot org
2007-07-08 22:55 ` [Bug fortran/28004] Warn if intent(out) dummy variable is used before being defined dfranke at gcc dot gnu dot org
2007-07-09 12:57 ` 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=20061103195947.15361.qmail@sourceware.org \
    --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).