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/29400] ANY and COUNT used on parameter arrays



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2006-10-09 12:36 -------
The generated code for:
  integer,parameter :: i(1,1) = 0
  integer :: j(1)
  j = lbound(any(i==1,2))
  end
is weird:

MAIN__ ()
{
  int4 j[1];

  _gfortran_set_std (70, 127, 0);
  {
    int8 S.0;

    S.0 = 1;
    while (1)
      {
        if (S.0 > 1) goto L.1; else (void) 0;
        {
          struct array1_logical4 atmp.1;
          int8 C.1248 = 2;
          logical4 C.1247 = 0;

          atmp.1.dtype = 273;
          atmp.1.data = 0B;
          atmp.1.offset = 0;
          _gfortran_any_l4 (&atmp.1, &C.1247, &C.1248);
          j[NON_LVALUE_EXPR <S.0> + -1] = (int4) atmp.1.dim[S.0 - 1].lbound;
          _gfortran_internal_free (atmp.1.data);
        }
        S.0 = S.0 + 1;
      }
    L.1:;
  }
}

Why are we passing a pointer to a logical4 as a second argument to
_gfortran_any_l4, and not an array descriptor.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-10-09 11:53:37         |2006-10-09 12:36:31
               date|                            |


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


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