stfc / fparser

This project maintains and develops a Fortran parser called fparser2 written purely in Python which supports Fortran 2003 and some Fortran 2008. A legacy parser fparser1 is also available but is not supported. The parsers were originally part of the f2py project by Pearu Peterson.
https://fparser.readthedocs.io
Other
64 stars 29 forks source link

Intrinsic `random_number` not recognised #434

Open hiker opened 11 months ago

hiker commented 11 months ago

The following code snippet from LFRic (taken from PSyclone's tests/psyad/tl2ad_test.py

real, dimension(npts) :: field
call random_number(field)

does not recognise random_number as an intrinsic. FParser returns it as:

 Call_Stmt(Name('random_number'), Actual_Arg_Spec_List(',', (Name('field'),)))

It should not be a Call_Stmt. I checked - it calls Call_Stmt.match, but not Intrinsic_Name.match.

hiker commented 11 months ago

date_and_time has the same issue. As has back_trace. I'll stop listing them :)