public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33117] New: Improve error message for generic interface with subroutines & functions
@ 2007-08-19 21:02 burnus at gcc dot gnu dot org
2007-08-20 14:49 ` [Bug fortran/33117] " fxcoudert at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-19 21:02 UTC (permalink / raw)
To: gcc-bugs
Mixing functions and subroutines in a generic interface is invalid. gfortran
detects this but the error message is difficult to understand:
Error: FUNCTION at (1) does not belong in a generic subroutine interface
NAG f95:
Error: b.f90, line 10: BAR and SUB must both be SUBROUTINEs or both be
FUNCTIONs for generic GEN
g95:
Error: Interfaces of generic 'gen' at (1) must all be FUNCTIONs or SUBROUTINEs
ifort -stand f95:
fortcom: Warning: b.f90, line 6: Standard Fortran requires that within a
scoping unit, two procedures that have the same generic name shall both be
subroutines or both be functions. [BAR]
Example:
module mod
implicit none
interface gen
subroutine sub()
end subroutine sub
function bar()
real :: bar
end function bar
end interface gen
end module mod
--
Summary: Improve error message for generic interface with
subroutines & functions
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
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=33117
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/33117] Improve error message for generic interface with subroutines & functions
2007-08-19 21:02 [Bug fortran/33117] New: Improve error message for generic interface with subroutines & functions burnus at gcc dot gnu dot org
@ 2007-08-20 14:49 ` fxcoudert at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-20 14:49 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-20 14:49:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33117
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-20 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-19 21:02 [Bug fortran/33117] New: Improve error message for generic interface with subroutines & functions burnus at gcc dot gnu dot org
2007-08-20 14:49 ` [Bug fortran/33117] " fxcoudert 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).