| 1 |
! PR libfortran/120152 |
| 2 |
! { dg-do run { target fortran_large_int } } |
| 3 |
|
| 4 |
subroutine f1 |
| 5 |
integer(kind=16) :: a (10, 10, 10) |
| 6 |
integer(kind=8) :: b (10, 10) |
| 7 |
logical :: c (10, 10, 10) |
| 8 |
a = 0 |
| 9 |
c = .true. |
| 10 |
b = maxloc (a, 2, c, 8, .true.) |
| 11 |
end |
| 12 |
subroutine f2 |
| 13 |
integer(kind=16) :: a (10, 10, 10) |
| 14 |
integer(kind=4) :: b (10, 10) |
| 15 |
logical :: c (10, 10, 10) |
| 16 |
a = 0 |
| 17 |
c = .true. |
| 18 |
b = maxloc (a, 2, c, 4, .true.) |
| 19 |
end |
| 20 |
subroutine f3 |
| 21 |
integer(kind=16) :: a (10, 10, 10) |
| 22 |
integer(kind=8) :: b (10, 10) |
| 23 |
a = 0 |
| 24 |
b = maxloc (a, 2, kind=8, back=.true.) |
| 25 |
end |
| 26 |
subroutine f4 |
| 27 |
integer(kind=16) :: a (10, 10, 10) |
| 28 |
integer(kind=4) :: b (10, 10) |
| 29 |
a = 0 |
| 30 |
b = maxloc (a, 2, kind=4, back=.true.) |
| 31 |
end |
| 32 |
subroutine f5 |
| 33 |
integer(kind=16) :: a (10, 10, 10) |
| 34 |
integer(kind=8) :: b (10, 10) |
| 35 |
logical :: c |
| 36 |
a = 0 |
| 37 |
c = .false. |
| 38 |
b = maxloc (a, 2, c, 8, .true.) |
| 39 |
end |
| 40 |
subroutine f6 |
| 41 |
integer(kind=16) :: a (10, 10, 10) |
| 42 |
integer(kind=4) :: b (10, 10) |
| 43 |
logical :: c |
| 44 |
a = 0 |
| 45 |
c = .false. |
| 46 |
b = maxloc (a, 2, c, 4, .true.) |
| 47 |
end |
| 48 |
subroutine f7 |
| 49 |
integer(kind=8) :: a (10, 10, 10) |
| 50 |
integer(kind=16) :: b (10, 10) |
| 51 |
logical :: c (10, 10, 10) |
| 52 |
a = 0 |
| 53 |
c = .true. |
| 54 |
b = maxloc (a, 2, c, 16, .true.) |
| 55 |
end |
| 56 |
subroutine f8 |
| 57 |
integer(kind=8) :: a (10, 10, 10) |
| 58 |
integer(kind=16) :: b (10, 10) |
| 59 |
a = 0 |
| 60 |
b = maxloc (a, 2, kind=16, back=.true.) |
| 61 |
end |
| 62 |
subroutine f9 |
| 63 |
integer(kind=8) :: a (10, 10, 10) |
| 64 |
integer(kind=16) :: b (10, 10) |
| 65 |
logical :: c |
| 66 |
a = 0 |
| 67 |
c = .false. |
| 68 |
b = maxloc (a, 2, c, 16, .true.) |
| 69 |
end |
| 70 |
program pr120152 |
| 71 |
call f1 |
| 72 |
call f2 |
| 73 |
call f3 |
| 74 |
call f4 |
| 75 |
call f5 |
| 76 |
call f6 |
| 77 |
call f7 |
| 78 |
call f8 |
| 79 |
call f9 |
| 80 |
end |