This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran, committed] PR 21260: '!' in Hollerith constant misunderstood


This bug is fixed by the appended one-character change which I committed under
the obviously correct rule to the mainline together with a testcase, and I
will commit this to 4.0 once I've given it its testsuite spin.

- Tobi


? pr19479.diff
? semantic.cache
? fortran/050317.diff
? fortran/big.diff
? fortran/curr.diff
? fortran/dump.diff
? fortran/equiv.diff
? fortran/err
? fortran/f2c.diff
? fortran/f2c_050428.diff
? fortran/fold_build.diff
? fortran/followup.diff
? fortran/hex.diff
? fortran/implicit.diff
? fortran/nearest.diff
? fortran/nest.diff
? fortran/pr16907.diff
? fortran/pr20323.diff
? fortran/return.diff
? fortran/semantic.cache
? testsuite/f2c.diff
? testsuite/ts.diff
? testsuite/gcc.dg/semantic.cache
? testsuite/gfortran.dg/aaa.f90
? testsuite/gfortran.dg/common_5.s
? testsuite/gfortran.dg/f2c_4.f90
? testsuite/gfortran.dg/f2c_5.f90
? testsuite/gfortran.dg/fold_nearest.f90.t02.original
? testsuite/gfortran.dg/fold_nearest.s
? testsuite/gfortran.dg/semantic.cache
? testsuite/gfortran.fortran-torture/compile/mloc.s
? testsuite/gfortran.fortran-torture/execute/forall_3.s
? testsuite/gfortran.fortran-torture/execute/intrinsic_aint_anint.s
? testsuite/gfortran.fortran-torture/execute/userop.s
Index: fortran/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.421
diff -u -p -r1.421 ChangeLog
--- fortran/ChangeLog	11 May 2005 17:04:32 -0000	1.421
+++ fortran/ChangeLog	11 May 2005 22:31:09 -0000
@@ -1,5 +1,11 @@
 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
+	PR fortran/21260
+	* io.c (check_format): Look for literal characters inside
+	hollerith constant.
+
+2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
 	* resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
 	attribute from result symbol to function symbol.
 	* trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
Index: fortran/io.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/io.c,v
retrieving revision 1.21
diff -u -p -r1.21 io.c
--- fortran/io.c	9 Apr 2005 18:44:07 -0000	1.21
+++ fortran/io.c	11 May 2005 22:31:10 -0000
@@ -642,7 +642,7 @@ data_desc:
       {
         while(repeat >0)
          {
-          next_char(0);
+          next_char(1);
           repeat -- ;
          }
       }
Index: testsuite/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.5467
diff -u -p -r1.5467 ChangeLog
--- testsuite/ChangeLog	11 May 2005 14:52:30 -0000	1.5467
+++ testsuite/ChangeLog	11 May 2005 22:31:16 -0000
@@ -1,5 +1,10 @@
 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
+	PR fortran/21260
+	* gfortran.dg/hollerith_1.f90: New test.
+
+2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
 	* gfortran.dg/func_result_2.f90: New test.
 
 2005-05-11  Bud Davis  <bdavis@gfortran.org>
Index: testsuite/gfortran.dg/hollerith_1.f90
===================================================================
RCS file: testsuite/gfortran.dg/hollerith_1.f90
diff -N testsuite/gfortran.dg/hollerith_1.f90
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gfortran.dg/hollerith_1.f90	11 May 2005 22:31:19 -0000
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR 21260
+! We wrongly interpreted the '!' as the beginning of a comment.
+! Also verifies the functioning of hollerith formatting.
+      character*72 c
+      write(c,8000)
+8000  format(36(2H!)))
+      do i = 1,72,2
+         if (c(i:i+1) /= '!)') call abort
+      end do
+      end

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]