[PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334)

2021-09-19 Thread Sandra Loosemore
This patch fixes some bugs in handling of assumed-rank arguments revealed by the TS29113 testsuite, allowing xfails to be removed from those testcases. It was previously failing to diagnose an error when passing an assumed-rank argument to a procedure via a non-assumed-rank dummy, and giving a

[PATCH, Fortran] Fix testcases that violate C838, + revealed ICE

2021-09-19 Thread Sandra Loosemore
This patch fixes 3 testcases that violate F2018 C838 by passing an assumed-rank argument to a procedure via an assumed-sized dummy, by wrapping the call in a SELECT RANK construct. But wait, there's more! This triggered an ICE due to a null pointer dereference in the code that handles the asso