https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102973
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-10-28 CC| |anlauf at gcc dot gnu.org --- Comment #1 from anlauf at gcc dot gnu.org --- The analysis seems correct. The adusted logic would also agree with similar code in gfc_match_pointer_assignment (). I did play a little with ASSOCIATE to see if I could trigger a bug in mainline due to running into a wrong gfc_matching_procptr_assignment, but didn't succeed. If you provide a patch for the above that regtests ok, it is pre-approved. It is not clear to me how to get rid of gfc_matching_procptr_assignment completely and easily. One would need to inspect gfc_match_varspec () and gfc_match_rvalue () and their callers. I'd recomment to defer that.