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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [volatile11.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 that volatile can be applied to members of common blocks or
4
! equivalence groups (PR fortran/35037)
5
!
6
subroutine wait1
7
  logical event
8
  volatile event
9
  common /dd/ event
10
  event = .false.
11
  do
12
    if (event) print *, 'NotOptimizedAway1'
13
  end do
14
end subroutine
15
 
16
subroutine wait2
17
  logical event, foo
18
  volatile event
19
  equivalence (event, foo)
20
  event = .false.
21
  do
22
    if (event) print *, 'NotOptimizedAway2'
23
  end do
24
end subroutine
25
 
26
subroutine wait3
27
  logical event
28
  integer foo
29
  volatile foo
30
  equivalence (event, foo)
31
  event = .false.
32
  do
33
    if (event) print *, 'IsOptimizedAway'
34
  end do
35
end subroutine
36
 
37
! { dg-final { scan-tree-dump "NotOptimizedAway1" "optimized" } } */
38
! { dg-final { scan-tree-dump "NotOptimizedAway2" "optimized" } } */
39
! { dg-final { scan-tree-dump-not "IsOptimizedAway" "optimized" } } */
40
! { 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.