| 1 |
! PR libfortran/120152 |
| 2 |
! { dg-do run } |
| 3 |
|
| 4 |
subroutine f1 |
| 5 |
integer(kind=8) :: a (10, 10, 10), b (10, 10) |
| 6 |
logical :: c (10, 10, 10) |
| 7 |
a = 0 |
| 8 |
c = .true. |
| 9 |
b = maxloc (a, 2, c, 8, .true.) |
| 10 |
end |
| 11 |
subroutine f2 |
| 12 |
integer(kind=8) :: a (10, 10, 10) |
| 13 |
integer(kind=4) :: b (10, 10) |
| 14 |
logical :: c (10, 10, 10) |
| 15 |
a = 0 |
| 16 |
c = .true. |
| 17 |
b = maxloc (a, 2, c, 4, .true.) |
| 18 |
end |
| 19 |
subroutine f3 |
| 20 |
integer(kind=8) :: a (10, 10, 10), b (10, 10) |
| 21 |
a = 0 |
| 22 |
b = maxloc (a, 2, kind=8, back=.true.) |
| 23 |
end |
| 24 |
subroutine f4 |
| 25 |
integer(kind=8) :: a (10, 10, 10) |
| 26 |
integer(kind=4) :: b (10, 10) |
| 27 |
a = 0 |
| 28 |
b = maxloc (a, 2, kind=4, back=.true.) |
| 29 |
end |
| 30 |
subroutine f5 |
| 31 |
integer(kind=8) :: a (10, 10, 10), b (10, 10) |
| 32 |
logical :: c |
| 33 |
a = 0 |
| 34 |
c = .false. |
| 35 |
b = maxloc (a, 2, c, 8, .true.) |
| 36 |
end |
| 37 |
subroutine f6 |
| 38 |
integer(kind=8) :: a (10, 10, 10) |
| 39 |
integer(kind=4) :: b (10, 10) |
| 40 |
logical :: c |
| 41 |
a = 0 |
| 42 |
c = .false. |
| 43 |
b = maxloc (a, 2, c, 4, .true.) |
| 44 |
end |
| 45 |
program pr120152 |
| 46 |
call f1 |
| 47 |
call f2 |
| 48 |
call f3 |
| 49 |
call f4 |
| 50 |
call f5 |
| 51 |
call f6 |
| 52 |
end |