From 41e192eb403863a9fbf00f64d02e12c8a31a1be7 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Wed, 15 Mar 2006 07:08:06 +0000 Subject: [PATCH] re PR fortran/19101 (missing & in character continuation not caught) 2006-03-14 Jerry DeLisle PR fortran/19101 * gfortran.dg/continuation.f90: New test. * gfortran.dg/fmt_read_bz_bn.f90: Fix use of continuation. From-SVN: r112079 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/continuation.f90 | 15 +++++++++++++++ gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/continuation.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e955f5ef9dd..ec0cd751b9e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-03-14 Jerry DeLisle + + PR fortran/19101 + * gfortran.dg/continuation.f90: New test. + * gfortran.dg/fmt_read_bz_bn.f90: Fix use of continuation. + 2006-03-14 Richard Guenther PR tree-optimization/26672 diff --git a/gcc/testsuite/gfortran.dg/continuation.f90 b/gcc/testsuite/gfortran.dg/continuation.f90 new file mode 100644 index 00000000000..64a98ade9aa --- /dev/null +++ b/gcc/testsuite/gfortran.dg/continuation.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! { dg-options -Wampersand } +! PR 19101 Test line continuations and spaces. Note: the missing ampersand +! before "world" is non standard default behavior. Use -std=f95, -std=f2003, +! -pedantic, -Wall, or -Wampersand to catch this error +! Submitted by Jerry DeLisle . +program main + character (len=40) & + c + c = "Hello, & + world!" ! { dg-warning "Warning: Missing '&' in continued character constant" } + if (c.ne.& + "Hello, world!")& + call abort();end program main + diff --git a/gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 b/gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 index 5cda4bbad38..d0d01937ea2 100644 --- a/gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 @@ -14,7 +14,7 @@ character*80 :: ODATA="" character*80 :: CORRECT1=" 1110 2020 .30303E-07 44 55 6.6 70.07 .888E+01" character*80 :: CORRECT2="23450 10345. 12.45 1235 1234 2345 1345. 12.45 1235" character*80 :: CORRECT3=" -0.8000000000D+01 0.1000000000D-03& - 0.5000000000D+00 0.2500000000D+00" + & 0.5000000000D+00 0.2500000000D+00" READ(IDATA1, 10) I1(1,2), IVI, A1(3), JVI, KVI, A1(2), AVS, A1(1) 10 FORMAT (BZ,(2I4, E10.1, BN, 2I4, F5.2, BZ, F5.2, BN, E10.1)) -- 2.30.2