public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51828] New: libgfortran build warnings
@ 2012-01-11 20:44 burnus at gcc dot gnu.org
  2012-01-11 20:58 ` [Bug fortran/51828] " dominiq at lps dot ens.fr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-11 20:44 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51828
           Summary: libgfortran build warnings
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jb@gcc.gnu.org, tkoenig@gcc.gnu.org


One currently gets on the 4.7 trunk the following libgfortran build warnings:

libgfortran/intrinsics/unpack_generic.c: In function 'unpack_internal':
libgfortran/intrinsics/unpack_generic.c:149:12: warning: 'rstride[0]' may be
used uninitialized in this function [-Wuninitialized]
libgfortran/intrinsics/unpack_generic.c:150:12: warning: 'fstride[0]' may be
used uninitialized in this function [-Wuninitialized]
libgfortran/intrinsics/unpack_generic.c:151:12: warning: 'mstride[0]' may be
used uninitialized in this function [-Wuninitialized]


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
@ 2012-01-11 20:58 ` dominiq at lps dot ens.fr
  2012-01-11 21:06 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-11 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-11
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-11 20:58:30 UTC ---
Confirmed, I also see

../../../work/libgfortran/caf/libcaf.h:80:6: warning: no previous prototype for
'_gfortran_caf_critical' [-Wmissing-prototypes]
../../../work/libgfortran/caf/libcaf.h:81:6: warning: no previous prototype for
'_gfortran_caf_end_critical' [-Wmissing-prototypes]


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
  2012-01-11 20:58 ` [Bug fortran/51828] " dominiq at lps dot ens.fr
@ 2012-01-11 21:06 ` burnus at gcc dot gnu.org
  2012-01-11 22:33 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-11 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-11 21:05:01 UTC ---
(In reply to comment #1)
> I also see
> ../../../work/libgfortran/caf/libcaf.h:80:6: warning: no previous prototype for
> '_gfortran_caf_critical' [-Wmissing-prototypes]
> ../../../work/libgfortran/caf/libcaf.h:81:6: warning: no previous prototype for
> '_gfortran_caf_end_critical' [-Wmissing-prototypes]

Ignore that one - _gfortran_caf_critical / _gfortran_caf_end_critical is the
wrong approach for it. It should use internally type(lock_type) but that has
not yet been implemented.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
  2012-01-11 20:58 ` [Bug fortran/51828] " dominiq at lps dot ens.fr
  2012-01-11 21:06 ` burnus at gcc dot gnu.org
@ 2012-01-11 22:33 ` burnus at gcc dot gnu.org
  2012-02-27 21:41 ` mikael at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-11 22:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-11 22:32:56 UTC ---
(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 */


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-01-11 22:33 ` burnus at gcc dot gnu.org
@ 2012-02-27 21:41 ` mikael at gcc dot gnu.org
  2013-11-18  9:27 ` [Bug libfortran/51828] " fxcoudert at gcc dot gnu.org
  2013-11-18  9:28 ` fxcoudert at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2012-02-27 21:41 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libfortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-02-27 21:41 ` mikael at gcc dot gnu.org
@ 2013-11-18  9:27 ` fxcoudert at gcc dot gnu.org
  2013-11-18  9:28 ` fxcoudert at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2013-11-18  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Mon Nov 18 09:27:11 2013
New Revision: 204940

URL: http://gcc.gnu.org/viewcvs?rev=204940&root=gcc&view=rev
Log:
    PR libfortran/51828
    * intrinsics/unpack_generic.c (unpack_internal): Let the compiler
    know that dim > 0 to avoid warnings.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/unpack_generic.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libfortran/51828] libgfortran build warnings
  2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-11-18  9:27 ` [Bug libfortran/51828] " fxcoudert at gcc dot gnu.org
@ 2013-11-18  9:28 ` fxcoudert at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2013-11-18  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed on trunk.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-18  9:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 20:44 [Bug fortran/51828] New: libgfortran build warnings burnus at gcc dot gnu.org
2012-01-11 20:58 ` [Bug fortran/51828] " dominiq at lps dot ens.fr
2012-01-11 21:06 ` burnus at gcc dot gnu.org
2012-01-11 22:33 ` burnus at gcc dot gnu.org
2012-02-27 21:41 ` mikael at gcc dot gnu.org
2013-11-18  9:27 ` [Bug libfortran/51828] " fxcoudert at gcc dot gnu.org
2013-11-18  9:28 ` fxcoudert at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).