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

Subversion Repositories openrisc

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

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do compile }
! { dg-options "-O" }
! { dg-final { scan-assembler-not "i_am_optimized_away" } }
!
! PR fortran/50960
!
! PARAMETER arrays and derived types exists as static variables.
! Check that the their read-only nature is taken into account
! when optimizations are done.
!

module m
  integer, parameter :: PARA(*) = [1,2,3,4,5,6,7,8,9,10]
end module m

subroutine test()
use m
integer :: i
i = 1
if (para(i) /= 1) call i_am_optimized_away()
end

! { dg-final { cleanup-modules "m" } }

Go to most recent revision | 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.