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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [volatile6.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 "-O2 -fdump-tree-optimized" }
3
! Tests whether volatile really works for arrays
4
! PR fortran/29601
5
logical, allocatable, volatile :: t1(:)
6
logical, allocatable :: t2(:)
7
integer :: i
8
 
9
allocate(t1(1),t2(1))
10
t1 = .false.
11
t2 = .false.
12
do i = 1, 2
13
  if(ubound(t1,1) /= 1) print *, 'VolatileNotOptimizedAway1'
14
  if(ubound(t2,1) /= 1) print *, 'NonVolatileNotOptimizedAway1'
15
end do
16
 
17
t1 = .false.
18
if(t1(1)) print *, 'VolatileNotOptimizedAway2'
19
t2 = .false.
20
if(t2(1)) print *, 'NonVolatileNotOptimizedAway2'
21
end
22
! { dg-final { scan-tree-dump "VolatileNotOptimizedAway1" "optimized" } }
23
! { dg-final { scan-tree-dump "VolatileNotOptimizedAway2" "optimized" } }
24
! { dg-final { scan-tree-dump-not "NonVolatileNotOptimizedAway1" "optimized" } }
25
! { dg-final { scan-tree-dump-not "NonVolatileNotOptimizedAway2" "optimized" } }
26
! { dg-final { cleanup-tree-dump "optimized" } }

powered by: WebSVN 2.1.0

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