Open sscalpone opened 3 years ago
Quick analysis:
Note about IEEE functions: Currently I believe no one is working in IEEE functions implementation, it is not on our F95 roadmap. I believe they are technically F2003 because I cannot see them in earlier standards. Though they are probably a quite useful things to implement. Did you add the F95 keyword because they you found them in a program that is otherwise pure F95 ?
Rational of the current TODO:
The TODO looks legit to me because what lowering is seeing for this ieee_support_flag
call was resolved to ieee_support_flag_8
declared in the intrinsic module flang/module/ieee_exceptions.f90 here. This can be observed by running f18 -funparse on the program. You can see that the second argument of ieee_support_flag_8
is indeed an assumed rank array. IEEE functions appears in lowering as normal procedures defined in special modules, they are not represented as the core Fortran intrinsics listed in F2018 section 16.7. Right now, lowering is not checking if a "normal" procedure is declared in an intrinsic module or not, hence they fall in the user function path and hit the TODO there.
I am executing a test suite from before Fortran 2003. IEEE_SUPPORT_FLAG is from TR N1378. It is post 95 and pre 03. I suppose it is not strictly F95.
Technical Reports These are specifications of additional features intended to be included in the next revision of the standard. The intention is that compilers can begin implementation before the next revision is published.
Technical report 15580 extends Fortran 95 to provide access to features of IEEE arithmetic. The final draft is available as N1378.