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

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
On a big-endian system (gcc110), there are segfaults.
Looking into char_reshape_1.f90 yields

Breakpoint 1, _gfortran_reshape_char (ret=0xfffef130, ret_length=4294897968,
source=0x0, shape=0x9, pad=0xfffef1d8, order=0xfffef1b4, 
    source_length=4294898064, pad_length=4294898028) at
../../../../trunk/libgfortran/intrinsics/reshape_generic.c:381


Looking at the tree dump gives something very strange:

      struct array01_unknown * D.2133;

[...]

      D.2133 = &parm.11;
            typedef integer(kind=4) [3];
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^????

and then

      _gfortran_reshape_char (&atmp.19, 9, D.2133, D.2145, D.2147, D.2153, 9,
9);

(wrong prototype, gdb is apparently showing the function in the tail call).
So it seems that the stirng length constant simply has the wrong length,
it occupies eight bytes where it should occupy four.

Janne?

Reply via email to