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] New: Wrong output from a pure subroutine


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


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