Increase timeout factor for hppa*-*-* in gcc.dg/long_branch.c
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_exp_1.f90
blobbad3702ab425a77252ad10b236a3c4bafdb584ba
1 ! { dg-do run }
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
13 STOP 1
14 endif
15 end subroutine
17 implicit none
19 real, parameter :: r1 = 8e0
20 real, parameter :: r2 = 8e ! { equivalent to 8e0 }
21 real, volatile :: r3, r4
22 character(2) :: s
23 r3 = 8e ! { equivalent to 8e0 }
24 s = '8e'
26 read (s, *) r4
28 call asserteq (r1, r2, "[const]")
29 call asserteq (r1, r3, "[vol. ]")
30 call asserteq (r1, r4, "[read ]")
32 r4 = 8e + 48e
33 call asserteq (56e, r4, "[sum ]")
35 end