[Bug fortran/50406] ld undefined reference to __MOD_str
zeccav at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Sep 2 13:12:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50406
--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
! gfortran produces weird ld message undefined reference to `___MOD_str'
module m
contains
function fun(i)
character(2), PARAMETER :: str(1) = (/'SD'/)
character(len_trim(str(i))) :: fun
fun = str(i)
end function
end
use m
print *,fun(1) ! should display "SD"
end
gfortran gfbug48.f
/tmp/ccpTCSOy.o: In function `MAIN__':
gfbug48.f:(.text+0x132): undefined reference to `___MOD_str'
collect2: error: ld returned 1 exit status
More information about the Gcc-bugs
mailing list