https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86679
--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> --- I don't think that the 'i' is a problem. Regarding the subroutine, I think F2018-DIS C843 applies: C843 (R826) A nonpointer object with the INTENT (IN) attribute shall not appear in a variable definition context (19.6.7). Don't know how to reliably detect the 'p = 5' other than a runtime check, as a 'print *, p' should be fine.