This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34683] Fortran FE generated IL pessimizes middle-end IL and analysis



------- Comment #9 from rguenth at gcc dot gnu dot org  2008-01-06 10:34 -------
Basically, not re-using array descriptor variables is as bad as not re-using
I/O descriptor variables.  I also wonder what this _gfortran_internal_{un,}pack
is about?

For

   taux=gn(p2+p4)

gfortran generates

    real(kind=4) A.1[4];
    struct array1_real(kind=4) atmp.0;

    atmp.0.dtype = 281;
    atmp.0.dim[0].stride = 1;
    atmp.0.dim[0].lbound = 0;
    atmp.0.dim[0].ubound = 3;
    atmp.0.data = (void *) &A.1;
    atmp.0.offset = 0;
    {
      integer(kind=4) S.2;

      S.2 = 0;
      while (1)
        {
          if (S.2 > 3) goto L.1;
          (*(real(kind=4)[0:] *) atmp.0.data)[S.2] = (*p2)[S.2] + (*p4)[S.2];
          S.2 = S.2 + 1;
        }
      L.1:;
    }
    D.531 = _gfortran_internal_pack (&atmp.0);
    D.533 = gn (D.531);
    if ((real(kind=4)[0:] *) D.531 != (real(kind=4)[0:] *) atmp.0.data)
      {
        _gfortran_internal_unpack (&atmp.0, D.531);
        {
          void * D.532;

          D.532 = D.531;
          if (D.532 != 0B)
            {
              __builtin_free (D.532);
            }
        }
      }

why does it not know the result of

    if ((real(kind=4)[0:] *) D.531 != (real(kind=4)[0:] *) atmp.0.data)

at the point it creates the IL?  I suppose this is about arrays with
stride != 1?


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]