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, fortram] PR64506 FORMAT Parse Error with Continuation Line


Jerry DeLisle wrote:
The attached patch fixes this issue.
Regression tested on x86-64.
New test case attached.

OK for trunk?
Looks ok (together with a changelog for the test case).

However, I tried a similar fixed-form program and it failed similarly. I think you need a similar fix (in the same function) for fixed-form source code. See attachment for an example.

Tobias


2015-02-01 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    PR fortran/64506
    * scanner.c (gfc_next_char_literal): Check for '!' and if found,
    clear the comment and go back and get the next character.

 100  format('This format is OK.'
     &)
 200  format('This format fails.'!comment << FAILS
     &)
 300  format('This format fails.' !comment
     &)
 400  format('This format is OK.' !comment
     &)
 500  format('This format is OK.'  !comment
     &)
      end

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