------- Comment #1 from pault at gcc dot gnu dot org 2006-11-23 18:31 ------- Confirmed.... sort of. > > While one can sometimes not prevent the need for a array temporary, one often > can and should do so to speed up the program.
{ void * D.1019; struct array1_real4 parm.2; int4 D.1008; D.1008 = i; parm.2.dtype = 281; parm.2.dim[0].lbound = 1; parm.2.dim[0].ubound = 3; parm.2.dim[0].stride = 20; parm.2.data = (void *) &coord[D.1008 + -1]; parm.2.offset = 0; D.1019 = _gfortran_internal_pack (&parm.2); d = distance (D.1019); if (D.1019 != (real4[0:] *) parm.2.data) { _gfortran_internal_unpack (&parm.2, D.1019); _gfortran_internal_free (D.1019); } else { (void) 0; } } It is the parm.2.dim[0].stride = 20; that determines the need for a temporary. If it has a value of 1, internal pack returns a pointer to the source array. Thus, such an option would work for constant strides of other than one but would have to report in real-time for variable strides. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-11-23 18:31:25 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29952