This is the mail archive of the gcc-patches@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]

Re: [gfortran] Fix PR 17283: PACK intrinsic not working


> 2004-09-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
>
>  PR fortran/17283
> fortran/
>  * iresolve.c (gfc_resolve_pack): Choose function depending if mask is
>  scalar.
> libgfortran/
>  * intrinsics/pack_generic.c (__pack): Allocate memory for return array
>  if not done by caller.
>  (__pack_s): New function.
>  * runtime/memory.c (internal_malloc, internal_malloc64): Allow
>  allocating zero memory.
> testsuite/
>  * gfortran.fortran-torture/execute/intrinsic_pack.f90: Add more tests.

This doesn't work when the scalar mask has kind!=4.
As the mask is intent(in), you could be able do the conversion in the 
resolution function.

In the array mask case we play tricks in the library to handle this without 
requiring a copy.

Paul


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