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

            Bug ID: 85748
           Summary: dbg, gfortran: Erroneous watch of matrix rows as
                    formal arguments using assumed shape
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eberhard.fr...@th-nuernberg.de
  Target Milestone: ---

The newer versions of gdb have greatly simplified watching of Fortran arrays.
No longer *((real_8 *)y)@2 or similiar when one wants to watch arrays passed by
assumed shape to a subprogram. Just type the name of the array ... Thank you
very much for it!

But I believe there is a bug in watching arrays in a special case. This special
case occurs when you pass the row of a matrix (e.g. A(3, :)) to a subprogram
using assumed shape. The subprogram handles such vectors absolutely correctly,
but the vectors are displayed incorrectly using print in gdb. Obviously one
will see the first element of the row followed by wrong elements.

This error doesn't occur when one uses explict shape passing the matrix row.

I wrote a little sample program in order to demonstrate this behaviour and
attached it.

Reply via email to