public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39414] New: PROCEDURE statement double declaration bug
@ 2009-03-09 18:19 janus at gcc dot gnu dot org
2009-03-09 22:00 ` [Bug fortran/39414] " burnus at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-03-09 18:19 UTC (permalink / raw)
To: gcc-bugs
The following code is invalid, but currently accepted by gfortran:
procedure(iabs) :: p
integer :: p
end
It is also accepted when the two statements are reversed in order.
It's not completely obvious to me whether this variant is invalid, too:
procedure() :: p
integer :: p
It is rejected by g95, but one could argue that it is valid in the same way as:
external :: p
integer :: p
--
Summary: PROCEDURE statement double declaration bug
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39414
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39414] PROCEDURE statement double declaration bug
2009-03-09 18:19 [Bug fortran/39414] New: PROCEDURE statement double declaration bug janus at gcc dot gnu dot org
@ 2009-03-09 22:00 ` burnus at gcc dot gnu dot org
2009-03-11 16:20 ` janus at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-03-09 22:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2009-03-09 22:00 -------
> procedure() :: p
> integer :: p
I think it is valid; ifort 11beta also accepts it. (NAG 5.1 doesn't.)
Looking at "12.3.2.3 Procedure declaration statement" one sees that
"PROCEDURE()" is has the same effect as the EXTERNAL statement. And together
with the following, I think it makes it valid: "If proc-interface does not
appear, the procedure declaration statement does not specify whether the
declared procedures or procedure pointers are subroutines or functions."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39414
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39414] PROCEDURE statement double declaration bug
2009-03-09 18:19 [Bug fortran/39414] New: PROCEDURE statement double declaration bug janus at gcc dot gnu dot org
2009-03-09 22:00 ` [Bug fortran/39414] " burnus at gcc dot gnu dot org
@ 2009-03-11 16:20 ` janus at gcc dot gnu dot org
2009-04-06 8:33 ` janus at gcc dot gnu dot org
2009-04-06 8:37 ` janus at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-03-11 16:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janus at gcc dot gnu dot org 2009-03-11 16:19 -------
Patch: http://gcc.gnu.org/ml/fortran/2009-03/msg00028.html
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-03-11 16:19:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39414
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39414] PROCEDURE statement double declaration bug
2009-03-09 18:19 [Bug fortran/39414] New: PROCEDURE statement double declaration bug janus at gcc dot gnu dot org
2009-03-09 22:00 ` [Bug fortran/39414] " burnus at gcc dot gnu dot org
2009-03-11 16:20 ` janus at gcc dot gnu dot org
@ 2009-04-06 8:33 ` janus at gcc dot gnu dot org
2009-04-06 8:37 ` janus at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-04-06 8:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janus at gcc dot gnu dot org 2009-04-06 08:33 -------
Subject: Bug 39414
Author: janus
Date: Mon Apr 6 08:33:31 2009
New Revision: 145583
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145583
Log:
2009-04-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/39414
* decl.c (match_procedure_decl): Fix double declaration problems with
PROCEDURE statements.
* symbol.c (gfc_add_type): Ditto.
2009-04-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/39414
* gfortran.dg/proc_decl_21.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/proc_decl_21.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39414
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/39414] PROCEDURE statement double declaration bug
2009-03-09 18:19 [Bug fortran/39414] New: PROCEDURE statement double declaration bug janus at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-04-06 8:33 ` janus at gcc dot gnu dot org
@ 2009-04-06 8:37 ` janus at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-04-06 8:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janus at gcc dot gnu dot org 2009-04-06 08:36 -------
Committed as r145583. Closing.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39414
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-06 8:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 18:19 [Bug fortran/39414] New: PROCEDURE statement double declaration bug janus at gcc dot gnu dot org
2009-03-09 22:00 ` [Bug fortran/39414] " burnus at gcc dot gnu dot org
2009-03-11 16:20 ` janus at gcc dot gnu dot org
2009-04-06 8:33 ` janus at gcc dot gnu dot org
2009-04-06 8:37 ` janus at gcc dot gnu dot org
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).