public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3
@ 2011-12-14  0:58 matt at use dot net
  2011-12-14  1:04 ` [Bug middle-end/51544] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: matt at use dot net @ 2011-12-14  0:58 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51544
           Summary: uninitialized variable false positive prevents
                    bootstrap at -O3
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


I checked by hand, and this looks like a false positive to me. It doesn't come
up without
-O[3,fast].

NOTE: I have hand-modified my build/bootstrap-lto.mk to use -Ofast. It's
possible that using the bootstrap-O3 build-config will reproduce it as well.

$ ~/src/gcc-trunk/configure --enable-bootstrap --prefix=/home/matt
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-lto
--with-fpmath=sse --enable-languages=c,c++,lto
--with-build-config=bootstrap-lto --enable-build-with-cxx --disable-libmudflap
--with-cpu=core2 --with-tune=core2 --disable-libssp

$ make -j7 profiledbootstrap

/home/matt/src/gcc-trunk/gcc/cp/parser.c: In function ‘bool
cp_parser_ctor_initializer_opt_and_function_body(cp_parser*)’:
/home/matt/src/gcc-trunk/gcc/cp/parser.c:17533:43: error: ‘list’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]


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

* [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap at -O3
  2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
@ 2011-12-14  1:04 ` pinskia at gcc dot gnu.org
  2011-12-14 20:57 ` [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone matt at use dot net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-14  1:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-14 01:01:33 UTC ---
Most likely what is happening is cp_parser_compound_statement is being inlined
and it is not cost worthly to do the jump thread for check_body_p.


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

* [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone
  2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
  2011-12-14  1:04 ` [Bug middle-end/51544] " pinskia at gcc dot gnu.org
@ 2011-12-14 20:57 ` matt at use dot net
  2013-01-31 18:04 ` dcb314 at hotmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: matt at use dot net @ 2011-12-14 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

Matt Hargett <matt at use dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|uninitialized variable      |uninitialized variable
                   |false positive prevents     |false positive prevents
                   |bootstrap at -O3            |bootstrap with
                   |                            |-fipa-cp-clone

--- Comment #2 from Matt Hargett <matt at use dot net> 2011-12-14 20:52:30 UTC ---
Narrowed this down to -O2 -fipa-cp-clone that triggers the warning.


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

* [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone
  2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
  2011-12-14  1:04 ` [Bug middle-end/51544] " pinskia at gcc dot gnu.org
  2011-12-14 20:57 ` [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone matt at use dot net
@ 2013-01-31 18:04 ` dcb314 at hotmail dot com
  2013-02-12 19:22 ` mpolacek at gcc dot gnu.org
  2013-03-09 20:08 ` dcb314 at hotmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2013-01-31 18:04 UTC (permalink / raw)
  To: gcc-bugs


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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> 2013-01-31 18:03:04 UTC ---
I think I may be seeing something similar.

I've been trying to bootstrap using "-g -O3" in BOOT_CFLAGS. 
That doesn't work, but "-g -O2" of course does.

After trying out all the flags individually that
make the difference from -O2 to -O3, it is the -fipa-cp-clone
flag that is the only one that breaks bootstrap. The rest of 
the flags are fine.

On trunk snapshot of 20130130, I get

../../src/trunk/gcc/c/c-parser.c: In function ‘c_expr
c_parser_postfix_expression_after_primary(c_parser*, location_t, c_expr)’:
../../src/trunk/gcc/c/c-parser.c:6908:16: error: ‘origtypes’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
       origtypes);
                ^
This looks a false positive to me.


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

* [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone
  2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
                   ` (2 preceding siblings ...)
  2013-01-31 18:04 ` dcb314 at hotmail dot com
@ 2013-02-12 19:22 ` mpolacek at gcc dot gnu.org
  2013-03-09 20:08 ` dcb314 at hotmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-12 19:22 UTC (permalink / raw)
  To: gcc-bugs


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-12 19:21:39 UTC ---
http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00324.html ought to fix the
origtypes issue.


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

* [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone
  2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
                   ` (3 preceding siblings ...)
  2013-02-12 19:22 ` mpolacek at gcc dot gnu.org
@ 2013-03-09 20:08 ` dcb314 at hotmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2013-03-09 20:08 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from David Binderman <dcb314 at hotmail dot com> 2013-03-09 20:07:48 UTC ---
(In reply to comment #3)
> I've been trying to bootstrap using "-g -O3" in BOOT_CFLAGS. 
> That doesn't work, but "-g -O2" of course does.

I am pleased to be able to say that BOOT_CFLAGS= -g -O3
works for revision 196574 (Sat 09 March 2013).

I'll use this as my new default build setting,
so when it stops working I'll be able to put in a bug report.

This is a long way from -g -O3 being the default
for all architectures, but it is a good step forward.

I think this bug is fixed.


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

end of thread, other threads:[~2013-03-09 20:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14  0:58 [Bug middle-end/51544] New: uninitialized variable false positive prevents bootstrap at -O3 matt at use dot net
2011-12-14  1:04 ` [Bug middle-end/51544] " pinskia at gcc dot gnu.org
2011-12-14 20:57 ` [Bug middle-end/51544] uninitialized variable false positive prevents bootstrap with -fipa-cp-clone matt at use dot net
2013-01-31 18:04 ` dcb314 at hotmail dot com
2013-02-12 19:22 ` mpolacek at gcc dot gnu.org
2013-03-09 20:08 ` dcb314 at hotmail dot com

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).