[Bug fortran/56789] Wrong code with contiguous dummy argument

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Mar 30 22:35:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56789

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

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

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-03-30 22:35:51 UTC ---
The problem is that we pack the data, but do
not adjust the descriptor accordingly.

The dump looks like this:

   parm.10.dtype = 282;
    parm.10.dim[0].lbound = 1;
    parm.10.dim[0].ubound = 3;
    parm.10.dim[0].stride = 2;
    parm.10.dim[1].lbound = 1;
    parm.10.dim[1].ubound = 3;
    parm.10.dim[1].stride = 10;
    parm.10.data = (void *) &a[0];
    parm.10.offset = 0;
    origptr.11 = parm.10.data;
    D.1929 = _gfortran_internal_pack (&parm.10);
    parm.10.data = D.1929;
    foo (&parm.10);

and it should look like this:

   parm.12.dim[0].lbound = 1;
    parm.12.dim[0].ubound = 3;
    parm.12.dim[0].stride = 1;
    parm.12.dim[1].lbound = 1;
    parm.12.dim[1].ubound = 3;
    parm.12.dim[1].stride = 3;
[...]



More information about the Gcc-bugs mailing list