gcc/testsuite/gfortran.dg/complex_write.f90
raw| 1 | ! { dg-do run } |
| 2 | ! pr 19071 |
| 3 | ! test case provided by |
| 4 | ! [email protected] |
| 5 | program cio |
| 6 | complex a |
| 7 | real r1,r2 |
| 8 | a = cmplx(1.0, 2.0) |
| 9 | open(unit=74,status='scratch') |
| 10 | write(74,'(1P,E13.5)')a |
| 11 | rewind(74) |
| 12 | ! can read the complex in as two reals, one on each line |
| 13 | read(74,'(E13.5)')r1,r2 |
| 14 | if (r1.ne.1.0 .and. r2.ne.2.0) STOP 1 |
| 15 | end |