public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04
@ 2013-05-15 12:11 muhammad_bilal at mentor dot com
2013-05-15 12:43 ` [Bug c/57287] " palves at redhat dot com
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: muhammad_bilal at mentor dot com @ 2013-05-15 12:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Bug ID: 57287
Summary: GCC 4.9.0 fails to build GDB on Ubuntu 12.04
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: muhammad_bilal at mentor dot com
While I was building the latest GDB CVS source code with
gcc (GCC) 4.9.0 20130513 (experimental)
with building step
with building step
$CC="/home/mbilal/gcc-svn/install/bin/gcc" ./../src/configure
--prefix=/home/mbilal/commit-gdb-cvs/install
$ make
I got errors
-MF .deps/py-framefilter.Tpo -fno-strict-aliasing -DNDEBUG -fwrapv
.././../src/gdb/python/py-framefilter.c
In file included from .././../src/gdb/python/py-framefilter.c:24:0:
.././../src/gdb/python/py-framefilter.c: In function ‘enumerate_locals’:
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/python/py-framefilter.c:839:7: note: in expansion of macro
‘TRY_CATCH’
TRY_CATCH (except, RETURN_MASK_ALL)
^
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/python/py-framefilter.c:782:7: note: in expansion of macro
‘TRY_CATCH’
TRY_CATCH (except, RETURN_MASK_ALL)
^
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
EXCEPTIONS_SIGJMP_BUF *buf = \
^
.././../src/gdb/python/py-framefilter.c:762:4: note: in expansion of macro
‘TRY_CATCH’
TRY_CATCH (except, RETURN_MASK_ALL)
^
.././../src/gdb/python/py-framefilter.c:732:23: error: ‘locals_cleanups’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
struct cleanup *locals_cleanups;
^
.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
int local_indent = 8 + (8 * indent);
^
cc1: all warnings being treated as errors
make[2]: *** [py-framefilter.o] Error 1
make[2]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir'
make: *** [all] Error 2
But something looks really bogus with errors like
.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
int local_indent = 8 + (8 * indent);
First I reported a bug on GDB bugzilla
http://sourceware.org/bugzilla/show_bug.cgi?id=15463#c4
>From gcc-bugs-return-422328-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 15 12:32:29 2013
Return-Path: <gcc-bugs-return-422328-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17160 invoked by alias); 15 May 2013 12:32:29 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17140 invoked by uid 48); 15 May 2013 12:32:25 -0000
From: "muhammad_bilal at mentor dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
Date: Wed, 15 May 2013 12:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: blocker
X-Bugzilla-Who: muhammad_bilal at mentor dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_severity
Message-ID: <bug-57287-4-azAuEGbL55@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57287-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57287-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01001.txt.bz2
Content-length: 290
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW287
hmb <muhammad_bilal at mentor dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
@ 2013-05-15 12:43 ` palves at redhat dot com
2013-05-15 13:00 ` rguenth at gcc dot gnu.org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: palves at redhat dot com @ 2013-05-15 12:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
(Repeating my comment on the GDB bugzilla here)
All these warnings are around setjmp/longjmp.
E.g, with:
.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
int local_indent = 8 + (8 * indent);
local_indent is only used in a TRY_CATCH block, meaning, after a setjmp.
I suspect this to be related to this recent setjmp gcc change:
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00344.html
>From gcc-bugs-return-422331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 15 12:44:53 2013
Return-Path: <gcc-bugs-return-422331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24079 invoked by alias); 15 May 2013 12:44:53 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24047 invoked by uid 48); 15 May 2013 12:44:51 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57286] [4.9 regression] infinite recurison in fold-const.c:10037
Date: Wed, 15 May 2013 12:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57286-4-GfrMeTENlj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57286-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57286-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg01004.txt.bz2
Content-length: 557
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW286
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Intuitively, I'd say:
@@ -10041,7 +10041,7 @@
if (TREE_CODE (arg1) == COND_EXPR
|| TREE_CODE (arg1) == VEC_COND_EXPR
- || COMPARISON_CLASS_P (arg1))
+ || (COMPARISON_CLASS_P (arg1) && !VECTOR_TYPE_P (TREE_TYPE (arg1))))
{
tem = fold_binary_op_with_conditional_arg (loc, code, type, op0, op1,
arg1, arg0,
but I don't really have time to think about it right now (meeting).
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
2013-05-15 12:43 ` [Bug c/57287] " palves at redhat dot com
@ 2013-05-15 13:00 ` rguenth at gcc dot gnu.org
2013-05-22 17:10 ` [Bug middle-end/57287] " palves at redhat dot com
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-15 13:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-05-15
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Please attach at least one example as preprocessed source.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
2013-05-15 12:43 ` [Bug c/57287] " palves at redhat dot com
2013-05-15 13:00 ` rguenth at gcc dot gnu.org
@ 2013-05-22 17:10 ` palves at redhat dot com
2013-05-23 10:57 ` muhammad_bilal at mentor dot com
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: palves at redhat dot com @ 2013-05-22 17:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #3 from Pedro Alves <palves at redhat dot com> ---
hmb,
could you do that?
See instructions here: http://gcc.gnu.org/bugs/
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (2 preceding siblings ...)
2013-05-22 17:10 ` [Bug middle-end/57287] " palves at redhat dot com
@ 2013-05-23 10:57 ` muhammad_bilal at mentor dot com
2013-05-23 11:02 ` rguenth at gcc dot gnu.org
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: muhammad_bilal at mentor dot com @ 2013-05-23 10:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #4 from hmb <muhammad_bilal at mentor dot com> ---
I am attaching the all preprocessed source code of GDB
here is the link https://www.dropbox.com/s/ldml34p3lov867w/gcc-bug.zip
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (3 preceding siblings ...)
2013-05-23 10:57 ` muhammad_bilal at mentor dot com
@ 2013-05-23 11:02 ` rguenth at gcc dot gnu.org
2013-05-23 11:03 ` rguenth at gcc dot gnu.org
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23 11:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with -O2 -Wall.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (4 preceding siblings ...)
2013-05-23 11:02 ` rguenth at gcc dot gnu.org
@ 2013-05-23 11:03 ` rguenth at gcc dot gnu.org
2013-05-23 14:34 ` rguenth at gcc dot gnu.org
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23 11:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 30172
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30172&action=edit
preprocessed source
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (5 preceding siblings ...)
2013-05-23 11:03 ` rguenth at gcc dot gnu.org
@ 2013-05-23 14:34 ` rguenth at gcc dot gnu.org
2013-05-23 14:42 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23 14:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 30175
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30175&action=edit
somewhat reduced testcase
Autoreduced on level 0.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (6 preceding siblings ...)
2013-05-23 14:34 ` rguenth at gcc dot gnu.org
@ 2013-05-23 14:42 ` rguenth at gcc dot gnu.org
2013-05-24 11:01 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23 14:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 30176
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30176&action=edit
more reduced
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (7 preceding siblings ...)
2013-05-23 14:42 ` rguenth at gcc dot gnu.org
@ 2013-05-24 11:01 ` rguenth at gcc dot gnu.org
2013-05-24 12:45 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-24 11:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
#include <setjmp.h>
jmp_buf buf;
void foo (int);
void bar (int) __attribute__((leaf));
void enumerate_locals (int indent)
{
foo (0);
while (indent--)
{
int local_indent = 8 + (8 * indent);
if (local_indent != 8)
{
setjmp (buf);
bar (local_indent);
}
}
foo (1);
}
warns about uninitialized local_indent. The abnormal edges we insert
for foo (0) make undefined values flow into the setjmp block.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (8 preceding siblings ...)
2013-05-24 11:01 ` rguenth at gcc dot gnu.org
@ 2013-05-24 12:45 ` rguenth at gcc dot gnu.org
2013-08-19 21:54 ` meadori at gcc dot gnu.org
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-24 12:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri May 24 12:44:58 2013
New Revision: 199289
URL: http://gcc.gnu.org/viewcvs?rev=199289&root=gcc&view=rev
Log:
2013-05-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/57287
* tree-ssa-uninit.c (compute_uninit_opnds_pos): Disregard
all SSA names that occur in abnormal PHIs.
* gcc.dg/pr57287.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr57287.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-uninit.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] GCC 4.9.0 fails to build GDB on Ubuntu 12.04
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (9 preceding siblings ...)
2013-05-24 12:45 ` rguenth at gcc dot gnu.org
@ 2013-08-19 21:54 ` meadori at gcc dot gnu.org
2013-08-28 8:37 ` [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow rguenth at gcc dot gnu.org
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: meadori at gcc dot gnu.org @ 2013-08-19 21:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
meadori at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |meadori at gcc dot gnu.org
--- Comment #14 from meadori at gcc dot gnu.org ---
(In reply to hmb from comment #13)
> Created attachment 30201 [details]
> preprocessed source code
>
> Attaching the preprocessed source code
Here is a reduction (as of trunk today):
$ cat test.c
#include <setjmp.h>
#include <stdio.h>
struct node
{
struct node *next;
char *name;
} *list;
struct node *list;
struct node *head (void);
sigjmp_buf *bar (void);
int baz (void)
{
struct node *n;
int varseen = 0;
list = head ();
for (n = list; n; n = n->next)
{
if (!varseen)
varseen = 1;
sigjmp_buf *buf = bar ();
__sigsetjmp (*buf, 1);
}
if (!varseen)
return 0;
return 1;
}
$ i686-pc-linux-gnu-gcc --version
i686-pc-linux-gnu-gcc (GCC) 4.9.0 20130819 (experimental)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ i686-pc-linux-gnu-gcc -Wall -O2 -c test.c
test.c: In function 'baz':
test.c:26:19: warning: 'buf' may be used uninitialized in this function
[-Wmaybe-uninitialized]
sigjmp_buf *buf = bar ();
^
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (10 preceding siblings ...)
2013-08-19 21:54 ` meadori at gcc dot gnu.org
@ 2013-08-28 8:37 ` rguenth at gcc dot gnu.org
2013-08-28 16:58 ` xinliangli at gmail dot com
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-28 8:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|REOPENED |NEW
CC|rguenther at suse dot de |rguenth at gcc dot gnu.org
Target Milestone|--- |4.9.0
Summary|GCC 4.9.0 fails to build |[4.9 Regression] Bogous
|GDB on Ubuntu 12.04 |uninitialized warning with
| |abnormal control flow
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. David, can you have a look here? I had a hard time following what
exactly to do with the dataflow in the uninit pass for abnormal control flow
(abnormal control flow should be considered receiving an initialized value).
Thanks.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (11 preceding siblings ...)
2013-08-28 8:37 ` [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow rguenth at gcc dot gnu.org
@ 2013-08-28 16:58 ` xinliangli at gmail dot com
2013-08-29 8:18 ` [Bug middle-end/57287] [4.9 Regression] Bogus " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: xinliangli at gmail dot com @ 2013-08-28 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #16 from davidxl <xinliangli at gmail dot com> ---
(In reply to Richard Biener from comment #15)
> Confirmed. David, can you have a look here? I had a hard time following
> what
> exactly to do with the dataflow in the uninit pass for abnormal control flow
> (abnormal control flow should be considered receiving an initialized value).
>
> Thanks.
I looked at it a little. The warning is not from the predicated uninit analysis
which checks uses of phi defs. The warning is emitted from tree-ssa.c:1644 in
function warn_uninitialized_vars. It warns about the 'definitely' uninitialized
variable that may be executed. In this case it is use of 'buf_16(ab)' in BB3.
Not sure where this statement comes from:
buf_24 = buf_16(ab);
The dot file is attached.
digraph "uninit.c.131t.uninit1" {
overlap=false;
subgraph "baz" {
color="black";
label="baz";
fn_11_basic_block_0
[shape=Mdiamond,style=filled,fillcolor=white,label="ENTRY"];
fn_11_basic_block_1
[shape=Mdiamond,style=filled,fillcolor=white,label="EXIT"];
fn_11_basic_block_2 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:10000 |\<bb\ 2\>:\l\
|varseen_11(ab)\ =\ 0;\l\
|_14\ =\ head\ ();\l\
}"];
fn_11_basic_block_3 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:7100 |\<bb\ 3\>:\l\
|list\ =\ _14;\l\
|buf_24\ =\ buf_16(ab);\l\
|if\ (_14\ !=\ 0B)\l\
\ \ goto\ \<bb\ 4\>;\l\
else\l\
\ \ goto\ \<bb\ 8\>;\l\
}"];
fn_11_basic_block_4 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:8500 |\<bb\ 4\>:\l\
|#\ varseen_3(ab)\ =\ PHI\ \<1(3),\ 1(6)\>\l\
|#\ n_26(ab)\ =\ PHI\ \<_14(3),\ n_2(ab)(6)\>\l\
|#\ buf_27(ab)\ =\ PHI\ \<buf_24(3),\ buf_7(ab)(6)\>\l\
|buf_21\ =\ bar\ ();\l\
}"];
fn_11_basic_block_5 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:4250 |\<bb\ 5\>:\l\
}"];
fn_11_basic_block_6 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:2900 |\<bb\ 6\>:\l\
|#\ n_1(ab)\ =\ PHI\ \<n_15(ab)(2),\ n_26(ab)(4),\ n_26(ab)(5)\>\l\
|#\ varseen_4(ab)\ =\ PHI\ \<varseen_11(ab)(2),\ varseen_3(ab)(4),\
varseen_3(ab)(5)\>\l\
|#\ buf_6(ab)\ =\ PHI\ \<buf_16(ab)(2),\ buf_27(ab)(4),\ buf_21(5)\>\l\
|__sigsetjmp\ (buf_6(ab),\ 1);\l\
|n_19\ =\ n_1(ab)-\>next;\l\
|n_2(ab)\ =\ n_19;\l\
|varseen_5\ =\ varseen_4(ab);\l\
|buf_7(ab)\ =\ buf_6(ab);\l\
|if\ (n_2(ab)\ !=\ 0B)\l\
\ \ goto\ \<bb\ 4\>;\l\
else\l\
\ \ goto\ \<bb\ 7\>;\l\
}"];
fn_11_basic_block_7 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:1500 |\<bb\ 7\>:\l\
|_25\ =\ varseen_5;\l\
}"];
fn_11_basic_block_8 [shape=record,style=filled,fillcolor=lightgrey,label="{
FREQ:1500 |\<bb\ 8\>:\l\
|#\ _8\ =\ PHI\ \<_25(7),\ 0(3)\>\l\
|return\ _8;\l\
}"];
fn_11_basic_block_0:s -> fn_11_basic_block_2:n
[style="solid,bold",color=blue,weight=100,constraint=true, label="[100%]"];
fn_11_basic_block_2:s -> fn_11_basic_block_6:n
[style="solid,bold",color=red,weight=10,constraint=true, label="[29%]"];
fn_11_basic_block_2:s -> fn_11_basic_block_3:n
[style="solid,bold",color=blue,weight=100,constraint=true, label="[71%]"];
fn_11_basic_block_3:s -> fn_11_basic_block_4:n
[style="solid,bold",color=black,weight=10,constraint=true, label="[85%]"];
fn_11_basic_block_3:s -> fn_11_basic_block_8:n
[style="solid,bold",color=black,weight=10,constraint=true, label="[15%]"];
fn_11_basic_block_4:s -> fn_11_basic_block_6:n
[style="dotted,bold",color=red,weight=10,constraint=false, label="[50%]"];
fn_11_basic_block_4:s -> fn_11_basic_block_5:n
[style="solid,bold",color=blue,weight=100,constraint=true, label="[50%]"];
fn_11_basic_block_5:s -> fn_11_basic_block_6:n
[style="dotted,bold",color=blue,weight=10,constraint=false, label="[100%]"];
fn_11_basic_block_6:s -> fn_11_basic_block_4:n
[style="solid,bold",color=black,weight=10,constraint=true, label="[85%]"];
fn_11_basic_block_6:s -> fn_11_basic_block_7:n
[style="solid,bold",color=black,weight=10,constraint=true, label="[15%]"];
fn_11_basic_block_7:s -> fn_11_basic_block_8:n
[style="solid,bold",color=blue,weight=100,constraint=true, label="[100%]"];
fn_11_basic_block_8:s -> fn_11_basic_block_1:n
[style="solid,bold",color=black,weight=10,constraint=true, label="[100%]"];
fn_11_basic_block_0:s -> fn_11_basic_block_1:n
[style="invis",constraint=true];
}
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (12 preceding siblings ...)
2013-08-28 16:58 ` xinliangli at gmail dot com
@ 2013-08-29 8:18 ` rguenth at gcc dot gnu.org
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 8:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to davidxl from comment #16)
> (In reply to Richard Biener from comment #15)
> > Confirmed. David, can you have a look here? I had a hard time following
> > what
> > exactly to do with the dataflow in the uninit pass for abnormal control flow
> > (abnormal control flow should be considered receiving an initialized value).
> >
> > Thanks.
>
>
> I looked at it a little. The warning is not from the predicated uninit
> analysis which checks uses of phi defs. The warning is emitted from
> tree-ssa.c:1644 in function warn_uninitialized_vars. It warns about the
> 'definitely' uninitialized variable that may be executed. In this case it is
> use of 'buf_16(ab)' in BB3. Not sure where this statement comes from:
>
> buf_24 = buf_16(ab);
Oh, sorry for not looking close enough again. It is jump-threading introducing
this copy by duplicating a block with an abnormal PHI.
Not sure why it chooses to duplicate it - I see no jump threads registered
by DOM at -O1 - probably because:
if (dump_file && (dump_flags & TDF_DETAILS)
&& e->dest != e2->src)
fprintf (dump_file,
" Registering jump thread around one or more intermediate
blocks\n");
(gdb) p threaded_edges.vec_->vecdata_[0]->dest
$7 = <basic_block 0x7ffff6e1a4e0 (9)>
(gdb) p threaded_edges.vec_->vecdata_[1]->src
$8 = <basic_block 0x7ffff6e1a4e0 (9)>
but thats the jump threading it performs as it can optimize the if (!varseen)
check.
>From looking at the symptoms - warning about buf_16(D)(ab) use in
buf_24 = buf_16(D)(ab);
it seems simplest to disregard SSA names occuring in abnormal PHIs ...
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (14 preceding siblings ...)
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
@ 2013-08-29 11:20 ` rguenth at gcc dot gnu.org
2013-08-29 16:33 ` meadori at gcc dot gnu.org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 11:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed again.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (13 preceding siblings ...)
2013-08-29 8:18 ` [Bug middle-end/57287] [4.9 Regression] Bogus " rguenth at gcc dot gnu.org
@ 2013-08-29 11:20 ` rguenth at gcc dot gnu.org
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-29 11:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Aug 29 11:20:16 2013
New Revision: 202069
URL: http://gcc.gnu.org/viewcvs?rev=202069&root=gcc&view=rev
Log:
2013-08-29 Richard Biener <rguenther@suse.de>
PR middle-end/57287
* tree-ssa-copy.c (may_propagate_copy): Allow propagating
of default defs that appear in abnormal PHI nodes.
* gcc.dg/pr57287-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr57287-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-copy.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (15 preceding siblings ...)
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
@ 2013-08-29 16:33 ` meadori at gcc dot gnu.org
2013-09-03 0:51 ` amylaar at gcc dot gnu.org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: meadori at gcc dot gnu.org @ 2013-08-29 16:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #20 from meadori at gcc dot gnu.org ---
Confirmed fix.
I can also now build GDB trunk with GCC trunk (both from today).
Thanks Richard!
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (16 preceding siblings ...)
2013-08-29 16:33 ` meadori at gcc dot gnu.org
@ 2013-09-03 0:51 ` amylaar at gcc dot gnu.org
2013-09-03 7:49 ` rguenther at suse dot de
2013-09-03 7:53 ` rguenth at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-09-03 0:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amylaar at gcc dot gnu.org
--- Comment #21 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #18)
> Added:
> trunk/gcc/testsuite/gcc.dg/pr57287-2.c
Why is that using __sigsetjmp ? That's not a standard function.
E.g. newlib doesn't have it.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (17 preceding siblings ...)
2013-09-03 0:51 ` amylaar at gcc dot gnu.org
@ 2013-09-03 7:49 ` rguenther at suse dot de
2013-09-03 7:53 ` rguenth at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: rguenther at suse dot de @ 2013-09-03 7:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #22 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 3 Sep 2013, amylaar at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
>
> Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |amylaar at gcc dot gnu.org
>
> --- Comment #21 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #18)
>
> > Added:
> > trunk/gcc/testsuite/gcc.dg/pr57287-2.c
>
> Why is that using __sigsetjmp ? That's not a standard function.
> E.g. newlib doesn't have it.
Sorry, I forgot to change it to setjmp. Done now.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/57287] [4.9 Regression] Bogus uninitialized warning with abnormal control flow
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
` (18 preceding siblings ...)
2013-09-03 7:49 ` rguenther at suse dot de
@ 2013-09-03 7:53 ` rguenth at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-03 7:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Sep 3 07:53:05 2013
New Revision: 202197
URL: http://gcc.gnu.org/viewcvs?rev=202197&root=gcc&view=rev
Log:
2013-09-03 Richard Biener <rguenther@suse.de>
PR middle-end/57287
* gcc.dg/pr57287-2.c: Use setjmp, not __sigsetjmp.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr57287-2.c
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2013-09-03 7:53 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-15 12:11 [Bug c/57287] New: GCC 4.9.0 fails to build GDB on Ubuntu 12.04 muhammad_bilal at mentor dot com
2013-05-15 12:43 ` [Bug c/57287] " palves at redhat dot com
2013-05-15 13:00 ` rguenth at gcc dot gnu.org
2013-05-22 17:10 ` [Bug middle-end/57287] " palves at redhat dot com
2013-05-23 10:57 ` muhammad_bilal at mentor dot com
2013-05-23 11:02 ` rguenth at gcc dot gnu.org
2013-05-23 11:03 ` rguenth at gcc dot gnu.org
2013-05-23 14:34 ` rguenth at gcc dot gnu.org
2013-05-23 14:42 ` rguenth at gcc dot gnu.org
2013-05-24 11:01 ` rguenth at gcc dot gnu.org
2013-05-24 12:45 ` rguenth at gcc dot gnu.org
2013-08-19 21:54 ` meadori at gcc dot gnu.org
2013-08-28 8:37 ` [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow rguenth at gcc dot gnu.org
2013-08-28 16:58 ` xinliangli at gmail dot com
2013-08-29 8:18 ` [Bug middle-end/57287] [4.9 Regression] Bogus " rguenth at gcc dot gnu.org
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
2013-08-29 11:20 ` rguenth at gcc dot gnu.org
2013-08-29 16:33 ` meadori at gcc dot gnu.org
2013-09-03 0:51 ` amylaar at gcc dot gnu.org
2013-09-03 7:49 ` rguenther at suse dot de
2013-09-03 7:53 ` rguenth 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).