<div dir="ltr">Hello,<div>    I am working for SourceryInstitute and trying to help implement coarrays in flang. I am working towards making a contribution to flang, the contribution being adding num_images() to the list of intrinsic functions that are evaluated by flang. Related to this goal, I have three questions:</div><div><br></div><div>First, has the intrinsic module iso_fortran_env been implemented yet? num_images() is an overloaded function and one of the variants takes a single scalar argument of type TEAM_TYPE. When I try to run f18 with the command line option -funparse-with-symbols on a file that has a num_images() call using the TEAM_TYPE argument and the following code:</div><div>     use iso_fortran_env, only : team_type</div><div>flang produces these errors:</div><div>    num_images4.f90:5:7: error: Error reading module file for module 'iso_fortran_env'<br>    num_images4.f90:5:7: Could not open 'iso_fortran_env.mod': No such file or directory</div><div><br></div><div>Should I ignore testing num_images() calls with teams or try and complete the iso_fortran_env module?<br><div><br></div><div><div>Second, after adding num_images() to the list of functions evaluated as intrinsic in the file flang/lib/Evaluate/intrinsics.cpp, I also edited the file flang/unittests/Evaluate/intrinsics.cpp. In that file, I wrote test calls to test the num_images() evaluation. I was able to test the variant of num_images() that has no parameters and the variant of num_images() that has the parameter 'team_number' of type integer. I was unable to figure out how to write a test call that tests the call with an argument of TEAM_TYPE. Is there anyone who can direct me towards figuring this out?</div><div><br></div><div>And last, in addition to adding num_images() test calls to the unittests/Evaluate/intrinsics.cpp, are there other tests I should write for the patch I would like to submit to llvm to contribute?</div><div><br></div><div>The flang files I have edited (flang/lib/Evaluate/intrinsics.cpp and flang/unittests/Evaluate/intrinsics.cpp) can be found in the develop-coarrays branch of sourcery-institute's fork of llvm-project</div><div><a href="https://github.com/sourceryinstitute/flang-coarrays/blob/develop-coarrays/flang/lib/Evaluate/intrinsics.cpp">https://github.com/sourceryinstitute/flang-coarrays/blob/develop-coarrays/flang/lib/Evaluate/intrinsics.cpp</a><br></div><div><a href="https://github.com/sourceryinstitute/flang-coarrays/blob/develop-coarrays/flang/unittests/Evaluate/intrinsics.cpp">https://github.com/sourceryinstitute/flang-coarrays/blob/develop-coarrays/flang/unittests/Evaluate/intrinsics.cpp</a><br></div><div><br></div><div>I am also attaching the test file with calls to num_images() that I was using to test what symbols were being created, this is the file that creates the error messages described above.</div><div><br></div><div>Thank you for your time and help,</div><div>     Kate Rasmussen</div><div><br></div></div></div></div>