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/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking
Date: Thu, 08 Aug 2013 07:25:00 -0000	[thread overview]
Message-ID: <bug-58099-4-OYyzTkfSoO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58099-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to janus from comment #7)
> The following patch makes the error go away, but (as expected) causes a
> failure of proc_ptr_result_8.f90 in the testsuite ...
> -      if (!gfc_compare_interfaces (s2, s1, name, 0, 1,
> -				   err, sizeof(err), NULL, NULL))
> -	{
> -	  gfc_error ("Interface mismatch in procedure pointer assignment "
> -		     "at %L: %s", &rvalue->where, err);
> -	  return false;
> -	}


Doesn't that remove too much? I had expected some special case for PURE, while
checking otherwise that the interface matches. (Except for the case where the
proc-pointer only has an implicit interface like for "procedure(real)", unless
some characteristic of the RHS requires an explicit interface.)

* * *

Side note: The following compiles but should give an error as the interface
doesn't match. (If one swaps the pure, it does and should compile warning
free.)

subroutine foo()
end

interface
  pure subroutine foo()
  end subroutine foo
end interface
call foo()
end
>From gcc-bugs-return-427537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 08 07:27:32 2013
Return-Path: <gcc-bugs-return-427537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31868 invoked by alias); 8 Aug 2013 07:27:31 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 31743 invoked by uid 48); 8 Aug 2013 07:27:28 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking
Date: Thu, 08 Aug 2013 07:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: janus at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58099-4-QoDChmWqoV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58099-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58099-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00461.txt.bz2
Content-length: 336

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX099

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I just saw that Janus has already posted a patch:
http://gcc.gnu.org/ml/fortran/2013-08/msg00026.html , which is probably
sufficient for 4.8. But for 4.9 [at least as follow up], see my previous
remarks (comment 10).


  parent reply	other threads:[~2013-08-08  7:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  6:12 [Bug fortran/58099] New: over-zealous Error pointer error checking in gfortran 4.8 daniel.price at monash dot edu
2013-08-07  6:14 ` [Bug fortran/58099] " daniel.price at monash dot edu
2013-08-07  8:48 ` andy at gwentswordclub dot co.uk
2013-08-07  9:03 ` [Bug fortran/58099] [F03] over-zealous procedure " janus at gcc dot gnu.org
2013-08-07  9:13 ` andy at gwentswordclub dot co.uk
2013-08-07  9:26 ` [Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking janus at gcc dot gnu.org
2013-08-07  9:35 ` janus at gcc dot gnu.org
2013-08-07 12:17 ` janus at gcc dot gnu.org
2013-08-08  7:25 ` burnus at gcc dot gnu.org [this message]
2013-08-08  7:42 ` janus at gcc dot gnu.org
2013-08-10 12:57 ` janus at gcc dot gnu.org
2013-08-16 15:29 ` jakub at gcc dot gnu.org
2013-09-20  6:22 ` burnus at gcc dot gnu.org
2013-09-20  7:44 ` janus at gcc dot gnu.org
2013-09-20  8:25 ` janus at gcc dot gnu.org
2013-09-20  8:28 ` janus at gcc dot gnu.org
2013-09-20  9:13 ` janus at gcc dot gnu.org
2013-09-20 10:38 ` janus at gcc dot gnu.org
2013-09-20 10:44 ` janus at gcc dot gnu.org
2013-10-16  9:51 ` jakub at gcc dot gnu.org
2013-10-17  6:22 ` burnus at gcc dot gnu.org
2013-11-16 23:13 ` janus at gcc dot gnu.org
2013-11-17 12:14 ` janus at gcc dot gnu.org
2013-11-17 13:46 ` janus at gcc dot gnu.org
2013-12-02 22:10 ` burnus at gcc dot gnu.org
2013-12-03 23:03 ` burnus at gcc dot gnu.org
2013-12-08 21:34 ` burnus at gcc dot gnu.org
2013-12-08 21:42 ` burnus at gcc dot gnu.org
2013-12-08 23:56 ` daniel.price at monash dot edu
2013-12-09 23:17 ` burnus 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-58099-4-OYyzTkfSoO@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).