This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/15273] [gfortran] Wrong output from a pure subroutine


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]