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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The debugger shows that retarray is NULL on the call to matmul_r4.
Clearly, this is not supposed to happen.

Program received signal SIGSEGV, Segmentation fault.
_gfortran_matmul_r4 (retarray=0x0, a=0x7fffffffd730, b=0x7fffffffd700,
try_blas=0, blas_limit=0, gemm=0x0) at
../../../trunk/libgfortran/generated/matmul_r4.c:104
104       if (retarray->base_addr == NULL)

I am  a bit baffled by this, because this looks correct if you look at the use
of the variable D.2357.

      struct array1_real(kind=4) D.2357;
      D.2357 = *(struct array1_real(kind=4) *) __result;
      D.2357.data = 0B;
      _gfortran_matmul_r4 (*(struct array1_real(kind=4) * *) &D.2357, D.2384,
D.2391, 0, 0, 0B);
      ((struct array1_real(kind=4) *) __result)->data = D.2357.data;
      D.2360 = ((((struct array1_real(kind=4) *) __result)->dim[0].lbound -
D.2357.dim[0].lbound) - ((struct array1_real(kind=4) *)
__result)->dim[0].ubound) + D.2357.dim[0].ubound != 0;
      ((struct array1_real(kind=4) *) __result)->dim[0].ubound =
D.2357.dim[0].ubound + D.2362;

Reply via email to