[patch, committed] [4.3 Regression] corner case continuation line

Jerry DeLisle jvdelisle@verizon.net
Mon Jan 7 19:48:00 GMT 2008


This patch committed as obvious and simple.

I have not found a way to add a test case because any dg-error directives in a 
comment will prevent the error from occurring.  This is because we do free-form 
comment elimination elsewhere so printable characters in comments are seen in 
load_line.

A future enhancement will be to move free-form comment elimination down into 
load_line.

Committed revision 131371.

Jerry

2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/34659
	* scanner.c (load_line): Do not count ' ' as printable when checking for
	continuations.

Index: scanner.c
===================================================================
--- scanner.c	(revision 131355)
+++ scanner.c	(working copy)
@@ -1176,7 +1176,7 @@ load_line (FILE *input, char **pbuf, int
  	    seen_ampersand = 1;
  	}

-      if ((c != '&' && c != '!') || (c == '!' && !seen_ampersand))
+      if ((c != '&' && c != '!' && c != ' ') || (c == '!' && !seen_ampersand))
  	seen_printable = 1;

        /* Is this a fixed-form comment?  */



More information about the Fortran mailing list