summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/boz_complex_1.f90
blob: e05246aa1b3c51a359bb84f09176301b3bc915ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
program foo

   implicit none

   complex(4) z

   z = complex(z'4444', z'4444')    ! { dg-error "cannot both be BOZ" }
   if (real(z,4) /= 17476.0 .or. aimag(z) /= 42.0) stop 2

   z = complex(z'4444', 42)         ! { dg-error "cannot appear in the" }
   if (real(z,4) /= 17476.0 .or. aimag(z) /= 42.0) stop 2

   z = complex(z'44444400', 42.)    ! { dg-error "cannot appear in the" }
   if (real(z,4) /= 785.062500 .or. aimag(z) /= 42.0) stop 3

end program foo