[Bug fortran/15273] [gfortran] Wrong output from a pure subroutine
Tobias dot Schlueter at physik dot uni-muenchen dot de
gcc-bugzilla@gcc.gnu.org
Tue May 4 13:30:00 GMT 2004
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-05-04 13:30 -------
(In reply to comment #0)
> The code below gives wrong output, but is ok if "pure" is dropped.
That code should not compile.
> pure subroutine subx(i,iout)
> integer, intent(in) :: i
> integer, intent(out) :: iout
the first Constraint from 12.6. in the (draft) standard reads:
---
The /specification-part/ of a pure subroutine subprogram shall specify that all
dummy arguments have INTENT(IN) except procedure arguments and arguments with
the POINTER attribute.
---
This is violated here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15273
More information about the Gcc-bugs
mailing list