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/25071] dummy argument larger than actual argument
Date: Thu, 27 Jan 2011 11:02:00 -0000	[thread overview]
Message-ID: <bug-25071-4-qFCeW6Mc0P@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-25071-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-27 09:16:47 UTC ---
(In reply to comment #7)
> Sorry for being 'a bit' late with comments, but IMHO this should be an error
> and not just a warning, because
>
> 2) Other compilers reject it (so we can't argue that we must support this
> common extension)

Well, ifort and pathscale compile w/o warning and g95 with just a warning the
example at:  gfortran.fortran-torture/execute/st_function.f90

Thus, for compare_actual_formal I would make a distinction between:

      /* Special case for character arguments.  For allocatable, pointer
         and assumed-shape dummies, the string length needs to match
         exactly.  */

where I agree that at least for pointer and allocatable an error should be
printed - but probably also for assumed-shape dummies.

And to
      if (actual_size != 0
            && actual_size < formal_size
            && a->expr->ts.type != BT_PROCEDURE)

which can be less problematic and where a warning might be sufficient.


  parent reply	other threads:[~2011-01-27  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-25071-4@http.gcc.gnu.org/bugzilla/>
2011-01-25 12:41 ` jb at gcc dot gnu.org
2011-01-25 12:47 ` Joost.VandeVondele at pci dot uzh.ch
2011-01-25 12:51 ` burnus at gcc dot gnu.org
2011-01-27 11:02 ` burnus at gcc dot gnu.org [this message]
2011-01-27 13:42 ` Joost.VandeVondele at pci dot uzh.ch
2015-09-06  1:08 ` dominiq at lps dot ens.fr
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:48 ` [Bug fortran/25071] dummy argument larger than actual argument fxcoudert at gcc dot gnu dot org
2007-04-19 15:16 ` burnus at gcc dot gnu dot org
2007-05-03 19:50 ` patchapp at dberlin dot org
2007-05-04  7:54 ` burnus at gcc dot gnu dot org
2007-05-04  7:55 ` burnus at gcc dot gnu dot org
2007-07-24  9:42 ` burnus 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-25071-4-qFCeW6Mc0P@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).