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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> 2012-02-27 
21:17:39 UTC ---
(In reply to comment #3)
> (In reply to comment #0)
> > libgfortran/intrinsics/unpack_generic.c: In function 'unpack_internal':
> 
> The warnings are bogus - assuming that "dim > 0" - as:
> 
>   if (ret->data == NULL)
>       dim = GFC_DESCRIPTOR_RANK (mask);
>       for (n = 0; n < dim; n++)
>           rstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(ret, n);
>   else
>       dim = GFC_DESCRIPTOR_RANK (ret);
>       for (n = 0; n < dim; n++)
>           rstride[n] = GFC_DESCRIPTOR_STRIDE_BYTES(ret, n);
> 
>   rstride0 = rstride[0]; /* << may be used uninitialized in this function */

rstride0 = GFC_DESCRIPTOR_STRIDE_BYTES(ret, 0);  ?

assert (dim > 0); ?

otherwise -> WONTFIX : the compiler can't know that dim > 0.

Reply via email to