Dear all, I've been contemplating whether to submit the attached patch. It addresses an ICE-on-invalid as reported in the PR, and also fixes an accepts-invalid (see testcase), plus maybe some more, related due to incomplete checking of symbol attribute conflicts. The fix does not fully address the general issue, which is analyzed by Steve: some of the checks do depend on the selected Fortran standard, and under circumstances such as in the testcase the checking of other, standard-version-independent conflicts simply does not occur. Steve's solution would fix that, but unfortunately leads to issues with error recovery in notoriously fragile parts of the FE: e.g. testcase pr87907.f90 needs adjusting, and minor variations of it will lead to various other horrendous ICEs that remind of existing PRs where parsing or resolution goes sideways. I therefore propose a much simpler approach: move - if possible - selected of the standard-version-dependent checks after the version-independent ones. I think this could help in getting more consistent error reporting and recovery. However, I did *not* move those checks that are critical when processing interfaces. (-> pr87907.f90 / (sub)modules) The patch therefore does not require any testsuite update and should not give any other surprises, so it should be very safe. The plan is also to leave the PR open for the time being. Regtesting on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald