Skip to content

pp_ser: insertion of USE statement can cause problem #11

@clementval

Description

@clementval

Currently, pp_ser insert USEstatement just before it finds IMPLICIT NONE

It can cause problem in the following example:

MODULE dummy

CONTAINS

SUBROUTINE a()
  IMPLICIT NONE
  !$ser data ...
END SUBROUTINE a

SUBROUTINE b()
  IMPLICIT NONE
  !$ser data ...
END SUBROUTINE b

END MODULE

In this case, the USEstatement will be added just before the IMPLICIT NONEin subroutine a()but nothing will be added in subroutine b()

The USEstatement should always be added at the beginning of the MODULEif it is a module

Metadata

Metadata

Assignees

No one assigned

    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