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  <jvdeli...@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

Reply via email to