modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / boz_8.f90
blobb1d966f530d73e45ef1109236ffc20fd0c08633d
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 ! PR fortran/34342
6 ! Diagnose BOZ literal for non-integer variables in
7 ! a DATA statement. Cf. Fortran 2003, 5.2.5 DATA statement:
8 ! "If a data-stmt-constant is a boz-literal-constant, the
9 ! corresponding variable shall be of type integer."
11 real :: r
12 integer :: i
13 data i/z'111'/
14 data r/z'4455'/ ! { dg-error "BOZ literal constant" }
15 r = z'FFFF' ! { dg-error "BOZ literal constant" }
16 i = z'4455' ! { dg-error "BOZ literal constant" }
17 r = real(z'FFFFFFFFF')
18 end