[Bug fortran/15273] New: Wrong output from a pure subroutine
tcc at sentex dot net
gcc-bugzilla@gcc.gnu.org
Tue May 4 01:56:00 GMT 2004
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
More information about the Gcc-bugs
mailing list