2 ! { dg-options "-fdec" }
4 ! Test support for providing a default exponent of zero when unspecified in
5 ! real constants with -fdec.
8 subroutine asserteq (rexp
, ract
, msg
)
9 real, intent(in
) :: rexp
, ract
10 character(*), intent(in
) :: msg
11 if (rexp
.ne
. ract
) then
12 write (*, '(A,F12.6,F12.6)') msg
, rexp
, ract
19 real, parameter :: r1
= 8e0
20 real, parameter :: r2
= 8e
! { equivalent to 8e0 }
21 real, volatile :: r3
, r4
23 r3
= 8e
! { equivalent to 8e0 }
28 call asserteq (r1
, r2
, "[const]")
29 call asserteq (r1
, r3
, "[vol. ]")
30 call asserteq (r1
, r4
, "[read ]")
33 call asserteq (56e
, r4
, "[sum ]")