[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.