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
* [Bug fortran/31817] Give at least a warning for specification function without explicit interface 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 ` 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 2 siblings, 0 replies; 4+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-08-08 16:43 UTC (permalink / raw) To: gcc-bugs -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |accepts-invalid Last reconfirmed|0000-00-00 00:00:00 |2007-08-08 16:43:25 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31817 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/31817] Give at least a warning for specification function without explicit interface 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 2 siblings, 0 replies; 4+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-11-08 19:17 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-11-08 19:16 ------- I think we already emit the error you'd like (and probably have done so for quite some time): $ cat k.f90 function f2 (fn, i) integer :: i, fn character (len = fn (i)) :: f2 end function f2 $ gfortran -c k.f90 k.f90:3.20: character (len = fn (i)) :: f2 1 Error: Function 'fn' at (1) must be PURE Is there anything more than that? -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31817 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/31817] Give at least a warning for specification function without explicit interface 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 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu dot org @ 2007-11-08 20:46 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from burnus at gcc dot gnu dot org 2007-11-08 20:46 ------- > I think we already emit the error you'd like (and probably have done so for > quite some time): > > Error: Function 'fn' at (1) must be PURE Ok. Seemingly it has been fixed by collateral damage of a pure patch during 4.3.0. (It does not show this message in 4.2.2.) > Is there anything more than that? No. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution| |FIXED 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).