public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31817]  New: Give at least a warning for specification function without explicit interface
@ 2007-05-04 16:27 burnus at gcc dot gnu dot org
  2007-08-08 16:43 ` [Bug fortran/31817] " fxcoudert at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-04 16:27 UTC (permalink / raw)
  To: gcc-bugs

"A function is a specification function if it is a pure function, is not a
standard intrinsic function, is not an internal function, is not a statement
function, and does not have a dummy procedure argument."

This is true for "fn" in:

  function f2 (fn, i)
    integer :: i, fn
    character (len = fn (i)) :: f2

Other compilers give an error as "fn" has no explicit interface (with "PURE").
gfortran simply accepts this statement function. It should at least spit out a
warning.

$ ifort gfortran.dg/char_result_7.f90
fortcom: Error: gfortran.dg/char_result_7.f90, line 36: An explicit interface
is required for a specification function.   [FN]

$ NAG f95  gfortran.dg/char_result_7.f90
Error: gfortran.dg/char_result_7.f90, line 36: Reference to non-specification
function FN in specification expression

$ g95  gfortran.dg/char_result_7.f90 [...]
Error: Specification function 'fn' at (1) must be PURE


-- 
           Summary: Give at least a warning for specification function
                    without explicit interface
           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=31817


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-08 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-04 16:27 [Bug fortran/31817] New: Give at least a warning for specification function without explicit interface burnus at gcc dot gnu dot org
2007-08-08 16:43 ` [Bug fortran/31817] " fxcoudert at gcc dot gnu dot org
2007-11-08 19:17 ` fxcoudert at gcc dot gnu dot org
2007-11-08 20:46 ` 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).