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]

[Patch, Fortran, committed] PR 39811 Fix bogus continuation-line warning


The patch was approved by Paul in IRC and is rather obvious. Reported at
c.l.f, see PR 39811 for the link.

I've committed the following as Rev. 146460.

Tobias
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 146458)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2009-04-20  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/39811
+	* scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
+
 2009-04-20  Paul Thomas  <pault@gcc.gnu.org>
 
 	PR fortran/39800
Index: gcc/fortran/scanner.c
===================================================================
--- gcc/fortran/scanner.c	(Revision 146458)
+++ gcc/fortran/scanner.c	(Arbeitskopie)
@@ -1404,7 +1404,10 @@ load_line (FILE *input, gfc_char_t **pbu
       if (c == '&')
 	{
 	  if (seen_ampersand)
-	    seen_ampersand = 0;
+	    {
+	      seen_ampersand = 0;
+	      seen_printable = 1;
+	    }
 	  else
 	    seen_ampersand = 1;
 	}
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 146459)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2009-04-20  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/39811
+	* gfortran.dg/continuation_11.f90: New test.
+
 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
 	PR c++/13358
@@ -9,7 +14,7 @@
 	* g++.dg/warn/pr13358-3.C: New.
 	* g++.dg/warn/pr13358-4.C: New.
 
-2009-04-20  Andrew Pinski <andrew_pinski@playstation.sony.com>
+2009-04-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
 	* gcc.dg/framework-2.c: Fix up for non existent includes
 	being fatal errors now.
Index: gcc/testsuite/gfortran.dg/continuation_11.f90
===================================================================
--- gcc/testsuite/gfortran.dg/continuation_11.f90	(Revision 0)
+++ gcc/testsuite/gfortran.dg/continuation_11.f90	(Revision 0)
@@ -0,0 +1,15 @@
+! { dg-do run }
+! { dg-options "-Wall -pedantic" }
+! Before a bogus warning was printed
+!
+! PR fortran/39811
+!
+implicit none
+character(len=70) :: str
+write(str,'(a)') 'Print rather a lot of ampersands &&&&&
+   &&&&&
+   &&&&&'
+if (len(trim(str)) /= 44 &
+    .or. str /= 'Print rather a lot of ampersands &&&&&&&&&&&') &
+    call abort()
+end

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