[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / data_initialized_3.f90
blobc3ca4b334ee91ec7b873c1997530a343f13e2d52
1 ! { dg-do compile }
3 ! PR fortran/65532
4 ! The partial initialization through data statements was producing
5 ! shape mismatch errors.
7 ! Contributed by Harald Anlauf <anlauf@gmx.de>
9 module gfcbug131
10 implicit none
11 contains
12 DOUBLE PRECISION FUNCTION d1mach(i)
13 INTEGER, INTENT(IN) :: i
15 INTEGER :: small(4)
16 INTEGER :: large(4)
17 INTEGER :: right(4)
18 INTEGER :: diver(4)
19 INTEGER :: LOG10(4)
20 DOUBLE PRECISION :: dmach(5)
22 EQUIVALENCE (dmach(1),small(1))
23 EQUIVALENCE (dmach(2),large(1))
24 EQUIVALENCE (dmach(3),right(1))
25 EQUIVALENCE (dmach(4),diver(1))
26 EQUIVALENCE (dmach(5),LOG10(1))
28 DATA small(1),small(2) / 0, 1048576 /
29 DATA large(1),large(2) / -1, 2146435071 /
30 DATA right(1),right(2) / 0, 1017118720 /
31 DATA diver(1),diver(2) / 0, 1018167296 /
32 DATA LOG10(1),LOG10(2) / 1352628735, 1070810131 /
34 d1mach = dmach(i)
35 END FUNCTION d1mach
37 DOUBLE PRECISION FUNCTION foo (x)
38 DOUBLE PRECISION, INTENT(IN) :: x
39 foo = SQRT (d1mach(4))
40 END FUNCTION foo
42 end module gfcbug131