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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [init_flag_2.f90] - Blame information for rev 816

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=1 -finit-logical=true -finit-real=zero" }
3
 
4
program init_flag_2
5
  call real_test
6
  call logical_test
7
  call int_test
8
  call complex_test
9
end program init_flag_2
10
 
11
! Test some initializations for both implicitly and
12
! explicitly declared local variables.
13
subroutine real_test
14
  real r1
15
  real r2(10)
16
  dimension r3(10,10)
17
  if (r1 /= 0.0) call abort
18
  if (r2(2) /= 0.0) call abort
19
  if (r3(5,5) /= 0.0) call abort
20
  if (r4 /= 0.0) call abort
21
end subroutine real_test
22
 
23
subroutine logical_test
24
  logical l1
25
  logical l2(2)
26
  if (l1 .neqv. .true.) call abort
27
  if (l2(2) .neqv. .true.) call abort
28
end subroutine logical_test
29
 
30
subroutine int_test
31
  integer i1
32
  integer i2(10)
33
  dimension i3(10,10)
34
  if (i1 /= 1) call abort
35
  if (i2(2) /= 1) call abort
36
  if (i3(5,5) /= 1) call abort
37
  if (i4 /= 1) call abort
38
end subroutine int_test
39
 
40
subroutine complex_test
41
  complex c1
42
  complex c2(20,20)
43
  if (c1 /= (0.0,0.0)) call abort
44
  if (c2(1,1) /= (0.0,0.0)) call abort
45
end subroutine complex_test

powered by: WebSVN 2.1.0

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