Skip to content

Some Fortran2003.Intrinsic_Function_Reference in declarations are parsed as Fortran2003.Function_Reference. #447

Description

@JulienRemy

Using e.g. (see src/psyclone/tests/psyir/frontend/fparser2_test.py in PSyclone)

reader = FortranStringReader("integer, pointer :: l1 => null()")
node = Specification_Part(reader).content[0]

yields node == Type_Declaration_Stmt(Intrinsic_Type_Spec('INTEGER', None), Attr_Spec_List(',', (Attr_Spec('POINTER'),)), Entity_Decl_List(',', (Entity_Decl(Name('l1'), None, None, Initialization('=>', Function_Reference(Name('null'), None))),)))
where Function_Reference(Name('null'), None) should I think be Intrinsic_Function_Reference(Name('null'), None) instead.

For now this requires redirecting these explicitly from Fparser2Reader()._call_handler to Fparser2Reader()._intrinsic_handler in branch PSyclone 2586_fparser_function_reference.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions