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

--- Comment #24 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Aug 07, 2020 at 08:35:49PM +0000, jussilehtola at fedoraproject dot org
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
> 
> --- Comment #21 from Susi Lehtola <jussilehtola at fedoraproject dot org> ---
> to repeat: libgfortran crashes when you try to read an environment variable
> that is an empty string, in the case you have preallocated an array that is 
> the
> proper size i.e. zero characters.

to repeat: I cannot reproduce your issue.  It does not crash.
It exits with a runtime error.

% setenv HOSTNAME
% gfcx -o z b.f90
% ./z
Fortran runtime error: Zero-length string passed as value to
get_environment_variable.

That's it.  No crash.

Reply via email to