This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15273] [gfortran] Wrong output from a pure subroutine
- From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2004 13:30:21 -0000
- Subject: [Bug fortran/15273] [gfortran] Wrong output from a pure subroutine
- References: <20040504015650.15273.tcc@sentex.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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