aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f9023
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90
new file mode 100644
index 000000000..4e0060702
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/write_logical.f90
@@ -0,0 +1,23 @@
+! PR 14334, L edit descriptor does not work
+!
+! this test uses L1 and L4 to print TRUE and FALSE
+ logical true,false
+ character*10 b
+ true = .TRUE.
+ false = .FALSE.
+ b = ''
+ write (b, '(L1)') true
+ if (b(1:1) .ne. 'T') call abort
+
+ b = ''
+ write (b, '(L1)') false
+ if (b(1:1) .ne. 'F') call abort
+
+ b = ''
+ write(b, '(L4)') true
+ if (b(1:4) .ne. ' T') call abort
+
+ b = ''
+ write(b, '(L4)') false
+ if (b(1:4) .ne. ' F') call abort
+ end