aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/complex_write.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/complex_write.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/complex_write.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/complex_write.f90 b/gcc/testsuite/gfortran.dg/complex_write.f90
new file mode 100644
index 0000000..3b73ba3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/complex_write.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! pr 19071
+! test case provided by
+! Thomas.Koenig@online.de
+ program cio
+ complex a
+ real r1,r2
+ a = cmplx(1.0, 2.0)
+ open(unit=74,status='scratch')
+ write(74,'(1P,E13.5)'),a
+ rewind(74)
+! can read the complex in as two reals, one on each line
+ read(74,'(E13.5)')r1,r2
+ if (r1.ne.1.0 .and. r2.ne.2.0) call abort
+ end