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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [dup_save_2.f90] - Blame information for rev 193

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

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

powered by: WebSVN 2.1.0

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