1! { dg-do compile }
2! { dg-options "-std=gnu" }
3! { dg-add-options ieee }
4! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
5!
6! PR fortran/34398.
7!
8! Check for invalid numbers in bit-wise BOZ transfers
9!
10program test
11  implicit none
12  real(4), parameter :: r0 = z'FFFFFFFF' ! { dg-error "Arithmetic NaN" }
13  real(4) r
14  data r/z'FFFFFFFF'/ ! { dg-error "Arithmetic NaN" }
15  r = z'FFFFFFFF' ! { dg-error "Arithmetic NaN" }
16end program test
17