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] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-O" }
3
! { dg-final { scan-assembler-not "i_am_optimized_away" } }
4
!
5
! PR fortran/50960
6
!
7
! PARAMETER arrays and derived types exists as static variables.
8
! Check that the their read-only nature is taken into account
9
! when optimizations are done.
10
!
11
 
12
module m
13
  integer, parameter :: PARA(*) = [1,2,3,4,5,6,7,8,9,10]
14
end module m
15
 
16
subroutine test()
17
use m
18
integer :: i
19
i = 1
20
if (para(i) /= 1) call i_am_optimized_away()
21
end
22
 
23
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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