public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50659] [4.5/4.6/4.7 Regression] [F03] ICE with PROCEDURE statement
Date: Sat, 08 Oct 2011 10:49:00 -0000	[thread overview]
Message-ID: <bug-50659-4-fOap7uMRQl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50659-4@http.gcc.gnu.org/bugzilla/>

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|[4.5/4.6/4.7 Regression]    |[4.5/4.6/4.7 Regression]
                   |[F03] ICE on invalid with   |[F03] ICE with PROCEDURE
                   |procedure interface         |statement

--- Comment #7 from janus at gcc dot gnu.org 2011-10-08 10:49:38 UTC ---
(In reply to comment #4)
> I'm still not completely sure if the test case is valid or not. I could not
> find anything in the standard which forbids it, so I'm assuming it is valid for
> now.

For what it's worth, the test case in comment #2 is accepted by g95, PGI and
PathScale.

It is rejected by ifort with:

error #8169: The specified interface is not declared.   [PROC]
  procedure(Proc) :: Proc_Get
------------^

To my understanding, this is a bug in ifort. However, ifort does accept the
following variant (which also ICEs with gfortran):


module m
  integer :: arrSize
end module

module m2
contains
  function Proc (arg)
    use m
    double precision, dimension(arrSize) :: proc
    double precision :: arg
  end function
end

program p
  use m2
  implicit none
  procedure(Proc) :: Proc_Get
end


In summary, this test case is accepted by ifort, g95, PGI and PathScale, which
I think is strong empirical evidence that it is valid (though it's not a proof,
of course). I don't have access to any other compiler which supports PROCEDURE
statements.

Unless anyone can show me a restriction in the standard which makes it illegal,
I'll continue to assume that this is an ICE-on-valid bug (which makes it even
more severe).


  parent reply	other threads:[~2011-10-08 10:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 17:20 [Bug fortran/50659] New: ICE on invalid with procedure interface abenson at caltech dot edu
2011-10-07 18:23 ` [Bug fortran/50659] [F03] " janus at gcc dot gnu.org
2011-10-07 18:46 ` janus at gcc dot gnu.org
2011-10-07 19:33 ` janus at gcc dot gnu.org
2011-10-07 20:37 ` janus at gcc dot gnu.org
2011-10-07 20:43 ` [Bug fortran/50659] [4.5/4.6/4.7 Regression] " janus at gcc dot gnu.org
2011-10-07 23:06 ` janus at gcc dot gnu.org
2011-10-08 10:49 ` janus at gcc dot gnu.org [this message]
2011-10-08 10:55 ` [Bug fortran/50659] [4.5/4.6/4.7 Regression] [F03] ICE with PROCEDURE statement dominiq at lps dot ens.fr
2011-10-08 11:12 ` [Bug fortran/50659] [4.4/4.5/4.6/4.7 " janus at gcc dot gnu.org
2011-10-08 11:20 ` janus at gcc dot gnu.org
2011-10-08 15:09 ` janus at gcc dot gnu.org
2011-10-09 11:34 ` janus at gcc dot gnu.org
2011-10-10 11:31 ` rguenth at gcc dot gnu.org
2011-10-12 18:54 ` janus at gcc dot gnu.org
2011-10-13 15:04 ` janus at gcc dot gnu.org
2011-10-15 12:16 ` janus at gcc dot gnu.org
2011-10-15 12:18 ` janus at gcc dot gnu.org
2011-10-20 12:37 ` dodji 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-50659-4-fOap7uMRQl@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).