------- Additional Comments From tobi at gcc dot gnu dot org  2005-05-19 22:19 
-------
One more thing I forgot to mention: for n = 100 the .original dump looks like 
this:
    int4 offset.1;
    struct array1_int4 atmp.0;

    atmp.0.dtype = 265;
    atmp.0.dim[0].stride = 1;
    atmp.0.dim[0].lbound = 0;
    atmp.0.dim[0].ubound = 9999;
    atmp.0.data = (int4[0:] *) _gfortran_internal_malloc (40000);
    atmp.0.offset = 0;
    offset.1 = 0;
    j = 1;
    while (1)
      {
        if (j > 100) goto L.1; else (void) 0;
        (*atmp.0.data)[offset.1] = j + 4;
        offset.1 = offset.1 + 1;
        (*atmp.0.data)[offset.1] = j + 5;
        offset.1 = offset.1 + 1;
        (*atmp.0.data)[offset.1] = j + 6;
        offset.1 = offset.1 + 1;
        (*atmp.0.data)[offset.1] = j + 7;
        ...
        offset.1 = offset.1 + 1;
        (*atmp.0.data)[offset.1] = j + 102;
        offset.1 = offset.1 + 1;
        (*atmp.0.data)[offset.1] = j + 103;
        offset.1 = offset.1 + 1;
        j = j + 1;
 etc.

which is probably not what we want.  The optimizers can't reduce this to the
original form either.

-- 


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

Reply via email to