From 92efdb0750ab63e9808604d2a496b23c5eb60fb8 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Fri, 15 Dec 2006 19:52:49 +0000 Subject: [PATCH] re PR libfortran/30200 ([4.1 only] write(*,myfmt="(1X,a,'xyz')") "A" prints Az' instead of Axyz) 2006-12-15 Jerry DeLisle PR fortran/30200 * gfortran.dg/write_fmt_trim.f90: New test. From-SVN: r119941 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/write_fmt_trim.f90 | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/write_fmt_trim.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e66f910ca7a..af858cb4e04 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-12-15 Jerry DeLisle + + PR fortran/30200 + * gfortran.dg/write_fmt_trim.f90: New test. + 2006-12-14 Diego Novillo PR 30194 diff --git a/gcc/testsuite/gfortran.dg/write_fmt_trim.f90 b/gcc/testsuite/gfortran.dg/write_fmt_trim.f90 new file mode 100644 index 00000000000..62f1af17444 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/write_fmt_trim.f90 @@ -0,0 +1,10 @@ +! { dg-do run } +! PR30200 write(*,myfmt="(1X,a,'xyz')") "A" prints Az' instead of Axyz +! Test case from PR, submitted by +program main + character (len=20) format + format = "(1X,a,'xyz')" + write(*,fmt=trim(format)) "A" ! Problem arose when trim was included here +end +! { dg-output " Axyz" } +