OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [value_test.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
program valueTests
  integer :: myInt
  interface
     subroutine mySub(myInt)
       integer, value :: myInt
     end subroutine mySub
  end interface

  myInt = 10

  call mySub(myInt)
  ! myInt should be unchanged since pass-by-value
  if(myInt .ne. 10) then
     call abort ()
  endif
end program valueTests

subroutine mySub(myInt)
  integer, value :: myInt
  myInt = 11
end subroutine mySub
  

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.