From ec88bf8bb7285cad65bda54ce3bd83b70e928fd6 Mon Sep 17 00:00:00 2001 From: Bud Davis Date: Tue, 22 Feb 2005 03:26:25 +0000 Subject: [PATCH] [multiple changes] 2004-02-21 Bud Davis PR fortran/20086 * io/transfer.c (write_constant_string): accept an 'h' as the start of a hollerith format string. 2005-02-21 Bud Davis PR fortran/20086 * gfortran.dg/pr20086.f90: New test. From-SVN: r95379 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr20086.f90 | 14 ++++++++++++++ libgfortran/ChangeLog | 6 ++++++ libgfortran/io/transfer.c | 2 +- 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr20086.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dd742ed74b9..87f91117297 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-02-21 Bud Davis + + PR fortran/20086 + * gfortran.dg/pr20086.f90: New test. + 2005-02-21 Alexandre Oliva PR tree-optimization/19786 diff --git a/gcc/testsuite/gfortran.dg/pr20086.f90 b/gcc/testsuite/gfortran.dg/pr20086.f90 new file mode 100644 index 00000000000..e5759da3dc1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr20086.f90 @@ -0,0 +1,14 @@ +! { dg-do run } +! PR 20086 - Missing characters in output with hollerith strings + implicit none + character*80 line + write(line,2070) + if (line.ne.' stiffness reformed for this high step')call abort + write(line,2090) + if (line.ne.' stiffness reformed for hello hello')call abort + stop + + 2070 format (2x,37hstiffness reformed for this high step) + 2090 format (2x,34hstiffness reformed for hello hello) + + end diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 9c0561b04c3..39b835d5bc9 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2004-02-21 Bud Davis + + PR fortran/20086 + * io/transfer.c (write_constant_string): accept an 'h' as + the start of a hollerith format string. + 2005-02-21 Eric Botcazou PR libfortran/19302 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index a55936f9e6c..0e4c619dc98 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -386,7 +386,7 @@ write_constant_string (fnode * f) for (; length > 0; length--) { c = *p++ = *q++; - if (c == delimiter && c != 'H') + if (c == delimiter && c != 'H' && c != 'h') q++; /* Skip the doubled delimiter. */ } }