]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gfortran.dg/boz_8.f90
arith.c (gfc_convert_integer, [...]): Move to ...
[thirdparty/gcc.git] / gcc / testsuite / gfortran.dg / boz_8.f90
CommitLineData
00a4618b
TB
1! { dg-do compile }
2! { dg-options "-std=f2003" }
3!
4! PR fortran/34342
5!
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."
10!
11real :: r
12integer :: i
13data i/z'111'/, r/z'4455'/ ! { dg-error "BOZ literal at .1. used to initialize non-integer variable 'r'" }
8dc63166
SK
14r = z'FFFF' ! { dg-error "a DATA statement value" }
15i = z'4455' ! { dg-error "a DATA statement value" }
16r = real(z'FFFFFFFFF')
00a4618b 17end