Skip to content

File with syntax error successfully parses with --keep-comments #505

@mn416

Description

@mn416

Hi,

I've got the following file called parse_error.f90. It contains invalid Fortran code due to a missing then keyword in the if statement. Notice that the file begins with some white space (a single empty line is sufficient to see the issue).

  
  
  
module m
  integer :: x
contains
  subroutine foo()
    if (.true.)
      x = 0
    end if
  end subroutine
end module

Running psyclone parse_error.f90 correctly gives a parse error. Running psyclone --keep-comments parse_error.f90 prints nothing and simply returns: there is no parse error and no code emitted.

I'm on PScylone commit f2023c8 (1 May) and fparser commit 7d396b6 (latest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions