public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57149] New: [4.8 Regression] wrong -Wmaybe-uninitialized warning with -Os
@ 2013-05-02 19:33 doko at gcc dot gnu.org
  2013-05-03  8:58 ` [Bug tree-optimization/57149] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: doko at gcc dot gnu.org @ 2013-05-02 19:33 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57149
           Summary: [4.8 Regression] wrong -Wmaybe-uninitialized warning
                    with -Os
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: doko@gcc.gnu.org


Created attachment 30007
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30007
preprocessed source

seen when building a driver in an arm linux 3.4 kernel, the warning shows up
when building with -Os, but not when building with -O[g123], works with all
optimization levels in 4.7.3.

$ gcc -Wall -Wno-unused-but-set-variable -Os -marm -mapcs -mabi=aapcs-linux
-march=armv7-a -msoft-float -g -c ci13xxx_msm.i)
In file included from drivers/usb/gadget/ci13xxx_msm.c:21:0:
drivers/usb/gadget/ci13xxx_msm.c: In function 'msm_udc_irq':
drivers/usb/gadget/ci13xxx_udc.c:2544:13: warning: 'err' may be used
uninitialized in this function [-Wmaybe-uninitialized]
    dbg_event(_usb_addr(mEp), "ERROR", err);
             ^
drivers/usb/gadget/ci13xxx_udc.c:2357:23: note: 'err' was declared here
   int type, num, dir; int err = -EINVAL;
                       ^
$ gcc -Wall -Wno-unused-but-set-variable -Og -marm -mapcs -mabi=aapcs-linux
-march=armv7-a -msoft-float -g -c ci13xxx_msm.i
$


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

end of thread, other threads:[~2013-05-07 10:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 19:33 [Bug tree-optimization/57149] New: [4.8 Regression] wrong -Wmaybe-uninitialized warning with -Os doko at gcc dot gnu.org
2013-05-03  8:58 ` [Bug tree-optimization/57149] " rguenth at gcc dot gnu.org
2013-05-03  8:58 ` rguenth at gcc dot gnu.org
2013-05-03  8:59 ` rguenth at gcc dot gnu.org
2013-05-07  7:01 ` [Bug tree-optimization/57149] [4.8/4.9 " jakub at gcc dot gnu.org
2013-05-07 10:40 ` jakub 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).