public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33116] New: External functions can be called as subroutine
@ 2007-08-19 20:26 burnus at gcc dot gnu dot org
2007-08-20 3:59 ` [Bug fortran/33116] " pault at gcc dot gnu dot org
2007-08-20 6:02 ` burnus at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-19 20:26 UTC (permalink / raw)
To: gcc-bugs
If one uses
EXTERNAL foo ! or PROCEDURE() :: foo
foo might be either function or a subroutine. However, using
REAL :: foo
EXTERNAL foo ! or: PROCEDURE(REAL) :: foo
foo is a function. However, gfortran happily allows the following:
EXTERNAL foo
REAL foo
CALL foo() ! <- wrong
NAG f95 diagnoses:
FOO has been declared as a function, not a subroutine
ifort:
The CALL statement is invoking a function subprogram as a subroutine.
g95:
Error: SUBROUTINE 'foo' at (1) cannot have REAL type
--
Summary: External functions can be called as subroutine
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33116
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/33116] External functions can be called as subroutine
2007-08-19 20:26 [Bug fortran/33116] New: External functions can be called as subroutine burnus at gcc dot gnu dot org
@ 2007-08-20 3:59 ` pault at gcc dot gnu dot org
2007-08-20 6:02 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-08-20 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2007-08-20 03:59 -------
Tobias,
EXTERNAL foo
REAL foo
CALL foo() ! <- wrong
END
with 4.3.0 20070815, gfc gives:
test.f90:1.14:
EXTERNAL foo
1
test.f90:3.23:
CALL foo() ! <- wrong
2
Error: 'foo' at (1) has a type, which is not consistent with the CALL at (2)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33116
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/33116] External functions can be called as subroutine
2007-08-19 20:26 [Bug fortran/33116] New: External functions can be called as subroutine burnus at gcc dot gnu dot org
2007-08-20 3:59 ` [Bug fortran/33116] " pault at gcc dot gnu dot org
@ 2007-08-20 6:02 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-20 6:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-08-20 06:02 -------
Hmm. I wonder why it did not work - probably I mixed it up with
PROCEDURE(REAL).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33116
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-20 6:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-19 20:26 [Bug fortran/33116] New: External functions can be called as subroutine burnus at gcc dot gnu dot org
2007-08-20 3:59 ` [Bug fortran/33116] " pault at gcc dot gnu dot org
2007-08-20 6:02 ` burnus 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).