[Bug fortran/96486] get_environment_variable fails for zero-length values

jussilehtola at fedoraproject dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 5 16:43:39 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486

--- Comment #4 from Susi Lehtola <jussilehtola at fedoraproject dot org> ---
$ export HOSTNAME=foo
$ ./a.out 
$

$ export HOSTNAME=
$ ./a.out 
Fortran runtime error: Zero-length string passed as value to
get_environment_variable.

Error termination. Backtrace:
#0  0x7f25c93aadf1 in ???
#1  0x7f25c93ab939 in ???
#2  0x7f25c93abe60 in ???
#3  0x7f25c960ce53 in ???
#4  0x401267 in ???
#5  0x4012c4 in ???
#6  0x7f25c903a041 in __libc_start_main
        at ../csu/libc-start.c:308
#7  0x4010ad in ???
#8  0xffffffffffffffff in ???
$


More information about the Gcc-bugs mailing list