| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-fdec" } |
| 3 |
! |
| 4 |
! Modified by Mark Eggleston <[email protected]> |
| 5 |
! |
| 6 |
|
| 7 |
subroutine normal |
| 8 |
integer(4) :: a |
| 9 |
real(4) :: b |
| 10 |
complex(4) :: c |
| 11 |
logical(4) :: d |
| 12 |
integer(4) :: e |
| 13 |
real(4) :: f |
| 14 |
complex(4) :: g |
| 15 |
logical(4) :: h |
| 16 |
|
| 17 |
data a / '1234' / |
| 18 |
data b / '1234' / |
| 19 |
data c / '12341234' / ! double the length for complex |
| 20 |
data d / '1234' / |
| 21 |
data e / 4h1234 / |
| 22 |
data f / 4h1234 / |
| 23 |
data g / 8h12341234 / ! double the length for complex |
| 24 |
data h / 4h1234 / |
| 25 |
|
| 26 |
if (a.ne.e) stop 1 |
| 27 |
if (b.ne.f) stop 2 |
| 28 |
if (c.ne.g) stop 3 |
| 29 |
if (d.neqv.h) stop 4 |
| 30 |
end subroutine |
| 31 |
|
| 32 |
subroutine padded |
| 33 |
integer(4) :: a |
| 34 |
real(4) :: b |
| 35 |
complex(4) :: c |
| 36 |
logical(4) :: d |
| 37 |
integer(4) :: e |
| 38 |
real(4) :: f |
| 39 |
complex(4) :: g |
| 40 |
logical(4) :: h |
| 41 |
|
| 42 |
data a / '12' / |
| 43 |
data b / '12' / |
| 44 |
data c / '12334' / |
| 45 |
data d / '123' / |
| 46 |
data e / 2h12 / |
| 47 |
data f / 2h12 / |
| 48 |
data g / 5h12334 / |
| 49 |
data h / 3h123 / |
| 50 |
|
| 51 |
if (a.ne.e) stop 5 |
| 52 |
if (b.ne.f) stop 6 |
| 53 |
if (c.ne.g) stop 7 |
| 54 |
if (d.neqv.h) stop 8 |
| 55 |
end subroutine |
| 56 |
|
| 57 |
subroutine truncated |
| 58 |
integer(4) :: a |
| 59 |
real(4) :: b |
| 60 |
complex(4) :: c |
| 61 |
logical(4) :: d |
| 62 |
integer(4) :: e |
| 63 |
real(4) :: f |
| 64 |
complex(4) :: g |
| 65 |
logical(4) :: h |
| 66 |
|
| 67 |
data a / '123478' / |
| 68 |
data b / '123478' / |
| 69 |
data c / '1234123498' / |
| 70 |
data d / '12345' / |
| 71 |
data e / 6h123478 / |
| 72 |
data f / 6h123478 / |
| 73 |
data g / 10h1234123498 / |
| 74 |
data h / 5h12345 / |
| 75 |
|
| 76 |
if (a.ne.e) stop 9 |
| 77 |
if (b.ne.f) stop 10 |
| 78 |
if (c.ne.g) stop 11 |
| 79 |
if (d.neqv.h) stop 12 |
| 80 |
end subroutine |
| 81 |
|
| 82 |
program test |
| 83 |
call normal |
| 84 |
call padded |
| 85 |
call truncated |
| 86 |
end program |
| 87 |
|