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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
  integer :: a(3), h, ia(1)
3
  integer, allocatable :: c(:)
4
  logical :: l
5
  logical :: l2(3)
6
 
7
  h = -huge(h)
8
  h = h - 1
9
  allocate (c(3))
10
  a(:) = 5
11
  ia = maxloc (a)
12
  if (ia(1).ne.1) call abort
13
  a(2) = huge(h)
14
  ia = maxloc (a)
15
  if (ia(1).ne.2) call abort
16
  a(:) = h
17
  ia = maxloc (a)
18
  if (ia(1).ne.1) call abort
19
  a(3) = -huge(h)
20
  ia = maxloc (a)
21
  if (ia(1).ne.3) call abort
22
  c(:) = 5
23
  ia = maxloc (c)
24
  if (ia(1).ne.1) call abort
25
  c(2) = huge(h)
26
  ia = maxloc (c)
27
  if (ia(1).ne.2) call abort
28
  c(:) = h
29
  ia = maxloc (c)
30
  if (ia(1).ne.1) call abort
31
  c(3) = -huge(h)
32
  ia = maxloc (c)
33
  if (ia(1).ne.3) call abort
34
  l = .false.
35
  l2(:) = .false.
36
  a(:) = 5
37
  ia = maxloc (a, mask = l)
38
  if (ia(1).ne.0) call abort
39
  ia = maxloc (a, mask = l2)
40
  if (ia(1).ne.0) call abort
41
  a(2) = huge(h)
42
  ia = maxloc (a, mask = l)
43
  if (ia(1).ne.0) call abort
44
  ia = maxloc (a, mask = l2)
45
  if (ia(1).ne.0) call abort
46
  a(:) = h
47
  ia = maxloc (a, mask = l)
48
  if (ia(1).ne.0) call abort
49
  ia = maxloc (a, mask = l2)
50
  if (ia(1).ne.0) call abort
51
  a(3) = -huge(h)
52
  ia = maxloc (a, mask = l)
53
  if (ia(1).ne.0) call abort
54
  ia = maxloc (a, mask = l2)
55
  if (ia(1).ne.0) call abort
56
  c(:) = 5
57
  ia = maxloc (c, mask = l)
58
  if (ia(1).ne.0) call abort
59
  ia = maxloc (c, mask = l2)
60
  if (ia(1).ne.0) call abort
61
  c(2) = huge(h)
62
  ia = maxloc (c, mask = l)
63
  if (ia(1).ne.0) call abort
64
  ia = maxloc (c, mask = l2)
65
  if (ia(1).ne.0) call abort
66
  c(:) = h
67
  ia = maxloc (c, mask = l)
68
  if (ia(1).ne.0) call abort
69
  ia = maxloc (c, mask = l2)
70
  if (ia(1).ne.0) call abort
71
  c(3) = -huge(h)
72
  ia = maxloc (c, mask = l)
73
  if (ia(1).ne.0) call abort
74
  ia = maxloc (c, mask = l2)
75
  if (ia(1).ne.0) call abort
76
  l = .true.
77
  l2(:) = .true.
78
  a(:) = 5
79
  ia = maxloc (a, mask = l)
80
  if (ia(1).ne.1) call abort
81
  ia = maxloc (a, mask = l2)
82
  if (ia(1).ne.1) call abort
83
  a(2) = huge(h)
84
  ia = maxloc (a, mask = l)
85
  if (ia(1).ne.2) call abort
86
  ia = maxloc (a, mask = l2)
87
  if (ia(1).ne.2) call abort
88
  a(:) = h
89
  ia = maxloc (a, mask = l)
90
  if (ia(1).ne.1) call abort
91
  ia = maxloc (a, mask = l2)
92
  if (ia(1).ne.1) call abort
93
  a(3) = -huge(h)
94
  ia = maxloc (a, mask = l)
95
  if (ia(1).ne.3) call abort
96
  ia = maxloc (a, mask = l2)
97
  if (ia(1).ne.3) call abort
98
  c(:) = 5
99
  ia = maxloc (c, mask = l)
100
  if (ia(1).ne.1) call abort
101
  ia = maxloc (c, mask = l2)
102
  if (ia(1).ne.1) call abort
103
  c(2) = huge(h)
104
  ia = maxloc (c, mask = l)
105
  if (ia(1).ne.2) call abort
106
  ia = maxloc (c, mask = l2)
107
  if (ia(1).ne.2) call abort
108
  c(:) = h
109
  ia = maxloc (c, mask = l)
110
  if (ia(1).ne.1) call abort
111
  ia = maxloc (c, mask = l2)
112
  if (ia(1).ne.1) call abort
113
  c(3) = -huge(h)
114
  ia = maxloc (c, mask = l)
115
  if (ia(1).ne.3) call abort
116
  ia = maxloc (c, mask = l2)
117
  if (ia(1).ne.3) call abort
118
  deallocate (c)
119
  allocate (c(-2:-3))
120
  ia = maxloc (c)
121
  if (ia(1).ne.0) call abort
122
end

powered by: WebSVN 2.1.0

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