Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JulienRemy opened this issue Jun 25, 2024 · 0 comments

Comments

@JulienRemy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant