Andy Porter

Results 748 comments of Andy Porter

To do that, you need to add a handler to the map: https://github.com/stfc/PSyclone/blob/53312078fbf7f1f07a8a4b501991c9a1a87dc784/src/psyclone/psyir/frontend/fparser2.py#L1063-L1067 and then implement the handler itself. As you might expect `_return_handler` is a very simple example: https://github.com/stfc/PSyclone/blob/53312078fbf7f1f07a8a4b501991c9a1a87dc784/src/psyclone/psyir/frontend/fparser2.py#L3803-L3818

I'm not sure. I've tried breaking out into the debugger in the comment handler (`import pdb; pdb.set_trace()`) and that reveals that the handler is never being called! I haven't figured...

I think the issue is in `_subroutine_handler`: https://github.com/stfc/PSyclone/blob/d87b76feb33a48369ea06be319493d8f64f1adb7/src/psyclone/psyir/frontend/fparser2.py#L4472-L4486 It's currently setup to skip over Comments. That needs removing. Also, the comment at 4472 should actually be at 4480.

Actually, it may not be that simple. Possibly we should search for `Dummy_Arg_List` explicitly (using a `_first_type_match` perhaps)?

If you change your test to use a Program instead of a Subroutine then it *should* work.

Nothing's ever easy is it? I've taken a look and I see: > /home/me/Projects/PSyclone/src/psyclone/psyir/frontend/fparser2.py(4706)_program_handler() -> self.process_nodes(file_container, node.children) (Pdb) node.children [Main_Program(Program_Stmt('PROGRAM', Name('test_comment')), Specification_Part(Implicit_Part(Comment('! hi'))), End_Program_Stmt('PROGRAM', Name('test_comment')))] So, in this particular case,...

Updating to say that @deardenchris and I have discovered that this is an issue for the halo buffer packing routines in the north-fold routines in lib_mpp in NEMO.

Stumbled across this @sergisiso - it relates to the discussion we had about character sub-strings in #3041.