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]

Re: [Patch, fortran] PR19260 & not required when splitting a token in continuation


On Thu, Sep 21, 2006 at 08:05:12PM -0700, Jerry DeLisle wrote:
> 2006-09-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
> 
> 	PR fortran/19260
> 	* scanner.c (gfc_next_char_literal): Add check for missing '&'
> 	and set locus to old_locus when not scanning a character literal.

This breaks several tests in libgomp.

omp_parse1.f90 can be fixed easily by undoing your changes for openmp_flag:
--- scanner.c.jj3       2006-10-05 00:27:43.000000000 +0200
+++ scanner.c   2006-10-05 16:19:47.000000000 +0200
@@ -709,6 +709,8 @@ restart:
                gfc_warning_now ("Missing '&' in continued character constant at %C");
              gfc_current_locus.nextc--;
            }
+         else if (openmp_flag)
+           gfc_current_locus.nextc--;
          else
            {
              c = ' ';
(see OpenMP 2.5, 2.1.2 where it says that & after !$omp on continuation
lines is optional, not mandatory), but that still doesn't help omp_cond3.F90:
  bar = 26
   !$  20 ba&
!$   &r = 4&
  !$2

is valid, the & there is again optional, see OpenMP 2.5, 2.2.2).

	Jakub


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