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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [dup_save_1.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
program save_1
3
  implicit none
4
  integer i
5
  integer foo1, foo2, foo3, foo4
6
  do i=1,10
7
     if (foo1().ne.i) then
8
        call abort
9
     end if
10
     if (foo2().ne.i) then
11
        call abort
12
     end if
13
     if (foo3().ne.i) then
14
        call abort
15
     end if
16
     if (foo4().ne.i) then
17
        call abort
18
     end if
19
  end do
20
end program save_1
21
 
22
integer function foo1 ()
23
  integer j
24
  save
25
  save ! { dg-warning "Blanket SAVE" }
26
  data j /0/
27
  j = j + 1
28
  foo1 = j
29
end function foo1
30
 
31
integer function foo2 ()
32
  integer j
33
  save j
34
  save j ! { dg-warning "Duplicate SAVE" }
35
  data j /0/
36
  j = j + 1
37
  foo2 = j
38
end function foo2
39
 
40
integer function foo3 ()
41
  integer j ! { dg-warning "Duplicate SAVE" }
42
  save
43
  save j ! { dg-warning "SAVE statement" }
44
  data j /0/
45
  j = j + 1
46
  foo3 = j
47
end function foo3
48
 
49
integer function foo4 ()
50
  integer j ! { dg-warning "Duplicate SAVE" }
51
  save j
52
  save
53
  data j /0/
54
  j = j + 1
55
  foo4 = j
56
end function foo4
57
 

powered by: WebSVN 2.1.0

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