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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [init_flag_3.f90] - Blame information for rev 704

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan" }
3
! { dg-add-options ieee }
4
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
5
 
6
program init_flag_3
7
  call real_test
8
  call logical_test
9
  call int_test
10
  call complex_test
11
end program init_flag_3
12
 
13
! Test some initializations for both implicitly and
14
! explicitly declared local variables.
15
subroutine real_test
16
  real r1
17
  real r2(10)
18
  dimension r3(10,10)
19
  if (r1 .eq. r1) call abort
20
  if (r2(2) .eq. r2(2)) call abort
21
  if (r3(5,5) .eq. r3(5,5)) call abort
22
  if (r4 .eq. r4) call abort
23
end subroutine real_test
24
 
25
subroutine logical_test
26
  logical l1
27
  logical l2(2)
28
  if (l1 .neqv. .false.) call abort
29
  if (l2(2) .neqv. .false.) call abort
30
end subroutine logical_test
31
 
32
subroutine int_test
33
  integer i1
34
  integer i2(10)
35
  dimension i3(10,10)
36
  if (i1 /= -1) call abort
37
  if (i2(2) /= -1) call abort
38
  if (i3(5,5) /= -1) call abort
39
  if (i4 /= -1) call abort
40
end subroutine int_test
41
 
42
subroutine complex_test
43
  complex c1
44
  complex c2(20,20)
45
  if (c1 .eq. c1) call abort
46
  if (c2(1,1) .eq. c2(1,1)) call abort
47
end subroutine complex_test

powered by: WebSVN 2.1.0

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