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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [init_flag_7.f90] - Blame information for rev 414

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-finit-integer=101" }
3
 
4
program init_flag_7
5
  call save_test1 (.true.)
6
  call save_test1 (.false.)
7
  call save_test2 (.true.)
8
  call save_test2 (.false.)
9
end program init_flag_7
10
 
11
! Test some initializations for both implicitly and
12
! explicitly declared local variables.
13
subroutine save_test1 (first)
14
  logical first
15
  integer :: i1 = -100
16
  integer i2
17
  integer i3
18
  save i2
19
  if (first) then
20
     if (i1 .ne. -100) call abort
21
     if (i2 .ne. 101) call abort
22
     if (i3 .ne. 101) call abort
23
  else
24
     if (i1 .ne. 1001) call abort
25
     if (i2 .ne. 1002) call abort
26
     if (i3 .ne. 101) call abort
27
  end if
28
  i1 = 1001
29
  i2 = 1002
30
  i3 = 1003
31
end subroutine save_test1
32
 
33
subroutine save_test2 (first)
34
  logical first
35
  integer :: i1 = -100
36
  integer i2
37
  save
38
  if (first) then
39
     if (i1 .ne. -100) call abort
40
     if (i2 .ne. 101) call abort
41
  else
42
     if (i1 .ne. 1001) call abort
43
     if (i2 .ne. 1002) call abort
44
  end if
45
  i1 = 1001
46
  i2 = 1002
47
end subroutine save_test2

powered by: WebSVN 2.1.0

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