This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15273] New: Wrong output from a pure subroutine
- From: "tcc at sentex dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2004 01:56:56 -0000
- Subject: [Bug fortran/15273] New: Wrong output from a pure subroutine
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The code below gives wrong output, but is ok if "pure" is dropped.
program testp
integer, parameter :: intp = 3
integer :: j
call subx(intp,j)
print *, intp, j
contains
pure subroutine subx(i,iout)
integer, intent(in) :: i
integer, intent(out) :: iout
iout = i + 1
end subroutine subx
end program testpar
$ gfortran -o testp testp.f90
$ ./testp
3 1073873990
$
--
Summary: Wrong output from a pure subroutine
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tcc at sentex dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15273