https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #21 from Susi Lehtola ---
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.
I don't get any m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #20 from Steve Kargl ---
On Fri, Aug 07, 2020 at 01:14:04PM +, jussilehtola at fedoraproject dot org
wrote:
>
> It already was reproduced in comment #9?
>
There is clearly a language barrier. At this point, I have
no idea what
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #19 from Susi Lehtola ---
(In reply to Steve Kargl from comment #17)
> On Thu, Aug 06, 2020 at 08:33:12PM +, jussilehtola at fedoraproject dot
> org wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
> >
> > --- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #18 from kargl at gcc dot gnu.org ---
Created attachment 49015
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49015&action=edit
Bring get_environment_variable almost to F2018 conformance
* check.c (gfc_check_get_environment_vari
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #17 from Steve Kargl ---
On Thu, Aug 06, 2020 at 08:33:12PM +, jussilehtola at fedoraproject dot org
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
>
> --- Comment #16 from Susi Lehtola ---
> Yes, then I installed m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #16 from Susi Lehtola ---
Yes, then I installed missing libgfortran debuginfos and the backtrace
shortened to
#0 0x401267 in zerolen_value
at /tmp/readvar2.f90:17
#1 0x4012c4 in main
at /tmp/readvar2.f90:22
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #15 from Steve Kargl ---
On Thu, Aug 06, 2020 at 08:42:20AM +, jussilehtola at fedoraproject dot org
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
>
> --- Comment #13 from Susi Lehtola ---
> The gdb output is the s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #14 from Steve Kargl ---
On Thu, Aug 06, 2020 at 08:03:29AM +, markeggleston at gcc dot gnu.org
wrote:
> (In reply to kargl from comment #6)
> > I do note there are other problems with get_environment_variable.
>
> It looks to me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #13 from Susi Lehtola ---
The gdb output is the same
(gdb) r
Starting program: /tmp/a.out
Fortran runtime error: Zero-length string passed as value to
get_environment_variable.
Error termination. Backtrace:
#0 0x401267 in zerolen_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
markeggleston at gcc dot gnu.org changed:
What|Removed |Added
CC||markeggleston at gcc do
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #11 from kargl at gcc dot gnu.org ---
(In reply to Susi Lehtola from comment #10)
> Compiled with -g, rerun gives
>
> $ ./a.out
> Fortran runtime error: Zero-length string passed as value to
> get_environment_variable.
>
> Error ter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #10 from Susi Lehtola ---
Compiled with -g, rerun gives
$ ./a.out
Fortran runtime error: Zero-length string passed as value to
get_environment_variable.
Error termination. Backtrace:
#0 0x401267 in zerolen_value
at /tmp/re
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #9 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #5)
> (In reply to Susi Lehtola from comment #4)
> > $ export HOSTNAME=foo
> > $ ./a.out
> > $
> >
> > $ export HOSTNAME=
> > $ ./a.out
> > Fortran runtime error:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #8 from Susi Lehtola ---
(In reply to kargl from comment #5)
> What gfortran version and operating system? I get
>
> % gfcx -o z b.f90 && ./z
> STOP System variable unassigned
> % gfcx -o z -g b.f90 && ./z
> STOP System variable una
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #7 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #6)
> I do note there are other problems with get_environment_variable.
>
> 1) Neither length nor status can be integer(1). gfortran should issue
>an error.
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #6 from kargl at gcc dot gnu.org ---
I do note there are other problems with get_environment_variable.
1) Neither length nor status can be integer(1). gfortran should issue
an error.
2) Fortran 2018 has added an optional errmsg a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
kargl at gcc dot gnu.org changed:
What|Removed |Added
Priority|P3 |P4
Status|WAITING
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #4 from Susi Lehtola ---
$ 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 ???
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #3 from Susi Lehtola ---
program zerolen_value
implicit none
character(len=*), parameter :: name='HOSTNAME'
character(len=:), allocatable :: value
integer :: l, err
call get_environment_variable(name,length=l,status=err)
i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
Dominique d'Humieres changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
--- Comment #2 from Dominique d'Humieres ---
Could you please provide an example?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
kargl at gcc dot gnu.org changed:
What|Removed |Added
CC||kargl at gcc dot gnu.org
--- C
22 matches
Mail list logo