OSDN Git Service

2006-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Mar 2006 07:08:06 +0000 (07:08 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Mar 2006 07:08:06 +0000 (07:08 +0000)
PR fortran/19101
* gfortran.dg/continuation.f90: New test.
* gfortran.dg/fmt_read_bz_bn.f90: Fix use of continuation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112079 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/continuation.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90

index e955f5e..ec0cd75 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       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  <rguenther@suse.de>
 
        PR tree-optimization/26672
diff --git a/gcc/testsuite/gfortran.dg/continuation.f90 b/gcc/testsuite/gfortran.dg/continuation.f90
new file mode 100644 (file)
index 0000000..64a98ad
--- /dev/null
@@ -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 <jvdelisle@gcc.gnu.org>.
+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
+
index 5cda4bb..d0d0193 100644 (file)
@@ -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))