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
61 stars 29 forks source link

Wrong min. no. of args for SELECTED_REAL_KIND intrinsic. #204

Closed arporter closed 5 years ago

arporter commented 5 years ago

According to: https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gfortran/SELECTED_005fREAL_005fKIND.html, the SELECTED_REAL_KIND intrinsic must have at least one argument but it is listed in Fortran2003.py as having a minimum of zero arguments.

rupertford commented 5 years ago

Yes, that is my mistake. The rule in the 2003 spec is

SELECTED REAL KIND ([P, R])

i.e. both P and R are optional, so I assumed 0 -> 2 args.

However the description in section 13.7.106 specifies that at least one of P or R must be present so it should be 1 -> 2.

rupertford commented 5 years ago

Created branch 204_selected_real_kind

arporter commented 5 years ago

205 has been merged. Closing issue.