[Bug fortran/126530] Option -Wundefined-vars doesn't catch functions returning without defining their result

"mikael at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126530

--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #0)
>   function k1()
>     integer, pointer :: k1
>     allocate(k1)
>   end function
>   function k2() result(r)
>     integer, pointer :: r
>     allocate(r)
>   end function

Actually, maybe these two can be dropped.
It would be fine for a user to define its own allocation function that would
return a pointer without defining the value.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.