[Bug fortran/25056] non-PURE function should not be a valid argument
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 26 19:20:00 GMT 2005
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-11-26 19:20 -------
gfortran doesn't catch this one.
## g95 ##
In file foo.f90:15
write(6,*) J(L)
1
Error: Dummy procedure 'l' at (1) must be PURE
## Intel ##
fortcom: Warning: foo.f90, line 3: This name has not been given an explicit
type. [L]
FUNCTION L()
----------^
fortcom: Warning: foo.f90, line 8: This name has not been given an explicit
type. [K]
PURE FUNCTION K()
-------------------^
fortcom: Warning: foo.f90, line 6: This name has not been given an explicit
type. [J]
PURE FUNCTION J(K)
---------------^
fortcom: Error: foo.f90, line 15: Procedure argument must be PURE [L]
write(6,*) J(L)
--------------^
fortcom: Error: foo.f90, line 15: The PURE attribute of the associated actual
procedure differs from the PURE attribute of the dummy procedure. [L]
write(6,*) J(L)
--------------^
compilation aborted for foo.f90 (code 1)
## Portland ##
## Sun ##
write(6,*) J(L)
^
"foo.f90", Line = 15, Column = 15: ERROR: Procedure "K" is being passed to PURE
procedure "L". It must also be PURE.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2005-11-26 19:20:43
date| |
Summary|better diagnostic needed |non-PURE function should not
| |be a valid argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25056
More information about the Gcc-bugs
mailing list