gcc/testsuite/gfortran.dg/boz_complex_1.f90
raw| 1 | ! { dg-do compile } |
| 2 | program foo |
| 3 | |
| 4 | implicit none |
| 5 | |
| 6 | complex(4) z |
| 7 | |
| 8 | z = complex(z'4444', z'4444') ! { dg-error "cannot both be BOZ" } |
| 9 | if (real(z,4) /= 17476.0 .or. aimag(z) /= 42.0) stop 2 |
| 10 | |
| 11 | z = complex(z'4444', 42) ! { dg-error "cannot appear in the" } |
| 12 | if (real(z,4) /= 17476.0 .or. aimag(z) /= 42.0) stop 2 |
| 13 | |
| 14 | z = complex(z'44444400', 42.) ! { dg-error "cannot appear in the" } |
| 15 | if (real(z,4) /= 785.062500 .or. aimag(z) /= 42.0) stop 3 |
| 16 | |
| 17 | end program foo |