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

--- Comment #32 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Hi Martin,

this

3822         ierr = pio_put_var (tape(t)%File, ps0var, (/ps0/))

looks like the culprit (or rather, where gfortran currently
generates wrong code).  This is consistent with the problem seen
in netcdf, so I feel pretty confident that this is indeed the problem.

To double-check, could you maybe do the following? Assume ps0 is a
real(kind=8) variable, do

...

   real(kind=8) :: ps0_array(1) ! Use the type as ps0

and then

    ps0_array(1) = ps0
    ierr = pio_put_var (tape(t)%File, ps0var, ps0_array)

and see if the segfault goes away, or at least if this one has
been removed, and there is a different one now :-)

Reply via email to