public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
@ 2011-08-10 19:29 jan.kratochvil at redhat dot com
2011-08-11 10:04 ` [Bug middle-end/50040] " rguenth at gcc dot gnu.org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-08-10 19:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Bug #: 50040
Summary: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used
uninitialized in this function
Classification: Unclassified
Product: gcc
Version: 4.5.4
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jan.kratochvil@redhat.com
Target: x86_64-unknown-linux-gnu
PASS: gcc (GCC) 4.4.7 20110810 (prerelease)
FAIL: gcc (GCC) 4.5.4 20110810 (prerelease)
FAIL: gcc (GCC) 4.6.2 20110810 (prerelease)
FAIL: gcc (GCC) 4.7.0 20110810 (experimental)
int *p;
void f (void)
{
struct { int y; } x;
*p = x.y;
}
--------------------------------------------------------------------------------
-c -Wall -O2
--------------------------------------------------------------------------------
PASS:
1.c: In function ‘f’:
1.c:5: warning: ‘x.y’ is used uninitialized in this function
FAIL:
<nothing>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
@ 2011-08-11 10:04 ` rguenth at gcc dot gnu.org
2011-08-11 10:42 ` jan.kratochvil at redhat dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-11 10:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-11 10:04:06 UTC ---
We should have never accepted the aggregate warning code in 4.4 and earlier
in it's current awkward form that only works for "testcases". It was removed.
This is a dup of PR????.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
2011-08-11 10:04 ` [Bug middle-end/50040] " rguenth at gcc dot gnu.org
@ 2011-08-11 10:42 ` jan.kratochvil at redhat dot com
2011-08-11 10:58 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-08-11 10:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-08-11 10:41:30 UTC ---
I was searching for duplicates but I haven't found a close enough one without
knowing GCC internals.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
2011-08-11 10:04 ` [Bug middle-end/50040] " rguenth at gcc dot gnu.org
2011-08-11 10:42 ` jan.kratochvil at redhat dot com
@ 2011-08-11 10:58 ` rguenth at gcc dot gnu.org
2011-08-11 11:23 ` jan.kratochvil at redhat dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-11 10:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-08-11
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.5.4
Ever Confirmed|0 |1
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-11 10:58:07 UTC ---
I have a patch to restore the warning for this toy testcase.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (2 preceding siblings ...)
2011-08-11 10:58 ` rguenth at gcc dot gnu.org
@ 2011-08-11 11:23 ` jan.kratochvil at redhat dot com
2011-08-11 14:29 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-08-11 11:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-08-11 11:22:41 UTC ---
Thanks for a fix, FYI this is a reduced real world problem.
During backporting of
[patch] Implement core file's PID for s390* and ppc*
http://sourceware.org/ml/binutils/2011-04/msg00272.html
specifically misordered:
vvv elf_tdata (abfd)->core_pid = psinfo.pr_pid;
^^^ memcpy (&psinfo, note->descdata, sizeof (psinfo));
I got a warning from RHEL-6 gcc-4.4.5-6.el6.x86_64 which I did not get the
warning during the patch preparation on Fedora 14 gcc-4.5.1-4.fc14.x86_64.
This problem was found and would be found afterwards anyway by a testcase but
not every line of GCC compiled code has a testcase.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (3 preceding siblings ...)
2011-08-11 11:23 ` jan.kratochvil at redhat dot com
@ 2011-08-11 14:29 ` rguenth at gcc dot gnu.org
2011-08-11 14:30 ` [Bug middle-end/50040] [4.5/4.6 " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-11 14:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-11 14:28:39 UTC ---
Author: rguenth
Date: Thu Aug 11 14:28:36 2011
New Revision: 177667
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177667
Log:
2011-08-11 Richard Guenther <rguenther@suse.de>
PR middle-end/50040
* gimplify.c (gimplify_modify_expr_complex_part): Mark the
load of the other piece with TREE_NO_WARNING.
* tree-flow.h (warn_uninit): Adjust prototype.
* tree-ssa.c (warn_uninit): Take uninitialized SSA name,
the base variable and the expression that is used separately.
Properly query all TREE_NO_WARNING flags.
(struct walk_data): Remove.
(warn_uninitialized_var): Likewise.
(warn_uninitialized_vars): Do not walk gimple pieces but simply
look at all SSA uses of the statement. Handle unused memory
separately.
* tree-ssa-uninit.c (warn_uninitialized_phi): Adjust.
* g++.dg/warn/unit-1.C: Un-XFAIL.
* gcc.dg/uninit-I.c: Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/g++.dg/warn/unit-1.C
trunk/gcc/testsuite/gcc.dg/uninit-I.c
trunk/gcc/tree-flow.h
trunk/gcc/tree-ssa-uninit.c
trunk/gcc/tree-ssa.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (4 preceding siblings ...)
2011-08-11 14:29 ` rguenth at gcc dot gnu.org
@ 2011-08-11 14:30 ` rguenth at gcc dot gnu.org
2011-11-02 9:51 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-11 14:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0
Summary|[4.5/4.6/4.7 Regression] |[4.5/4.6 Regression] missed
|missed warning: ‘x.y’ is |warning: ‘x.y’ is used
|used uninitialized in this |uninitialized in this
|function |function
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-11 14:28:59 UTC ---
Fixed for 4.7 sofar.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (5 preceding siblings ...)
2011-08-11 14:30 ` [Bug middle-end/50040] [4.5/4.6 " rguenth at gcc dot gnu.org
@ 2011-11-02 9:51 ` rguenth at gcc dot gnu.org
2011-11-03 15:15 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02 9:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sezeroz at gmail dot com
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 09:49:45 UTC ---
*** Bug 50950 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (6 preceding siblings ...)
2011-11-02 9:51 ` rguenth at gcc dot gnu.org
@ 2011-11-03 15:15 ` rguenth at gcc dot gnu.org
2012-01-03 13:31 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-03 15:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-03 15:14:38 UTC ---
Patch doesn't apply to the 4.6 branch. Don't hold your breath.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (7 preceding siblings ...)
2011-11-03 15:15 ` rguenth at gcc dot gnu.org
@ 2012-01-03 13:31 ` rguenth at gcc dot gnu.org
2012-01-03 13:32 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-03 13:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |belyshev at depni dot
| |sinp.msu.ru
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-03 13:28:07 UTC ---
*** Bug 50966 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (8 preceding siblings ...)
2012-01-03 13:31 ` rguenth at gcc dot gnu.org
@ 2012-01-03 13:32 ` rguenth at gcc dot gnu.org
2012-01-03 15:17 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-03 13:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-03 13:29:56 UTC ---
It's also questionable to cause new warnings to appear on the branch if
you consider code using -Werror. Leaving open a bit for further consideration,
should be closed as fixed for 4.7 once that is released and it didn't make
the 4.6 branch.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (9 preceding siblings ...)
2012-01-03 13:32 ` rguenth at gcc dot gnu.org
@ 2012-01-03 15:17 ` rguenth at gcc dot gnu.org
2012-01-03 16:55 ` sezeroz at gmail dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-03 15:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |szo at szo dot hu
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-03 15:16:57 UTC ---
*** Bug 51740 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (10 preceding siblings ...)
2012-01-03 15:17 ` rguenth at gcc dot gnu.org
@ 2012-01-03 16:55 ` sezeroz at gmail dot com
2012-06-20 13:03 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: sezeroz at gmail dot com @ 2012-01-03 16:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #12 from Ozkan Sezer <sezeroz at gmail dot com> 2012-01-03 16:54:00 UTC ---
(In reply to comment #10)
> It's also questionable to cause new warnings to appear on the branch if
> you consider code using -Werror.
gcc-4.4 used to warn (see bug 50950), therefore if someone's build is using
-Werror and added such uninitialized vars to his code _after_ beginning to use
gcc >= 4.5, he is not getting the error despite the fact that he wants to.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (11 preceding siblings ...)
2012-01-03 16:55 ` sezeroz at gmail dot com
@ 2012-06-20 13:03 ` rguenth at gcc dot gnu.org
2012-07-02 11:40 ` rguenth at gcc dot gnu.org
2013-04-12 16:18 ` [Bug middle-end/50040] [4.6 " jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-20 13:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.5/4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (12 preceding siblings ...)
2012-06-20 13:03 ` rguenth at gcc dot gnu.org
@ 2012-07-02 11:40 ` rguenth at gcc dot gnu.org
2013-04-12 16:18 ` [Bug middle-end/50040] [4.6 " jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.4 |4.6.4
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 11:38:52 UTC ---
The 4.5 branch is being closed, adjusting target milestone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/50040] [4.6 Regression] missed warning: ‘x.y’ is used uninitialized in this function
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
` (13 preceding siblings ...)
2012-07-02 11:40 ` rguenth at gcc dot gnu.org
@ 2013-04-12 16:18 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.6.4 |4.7.0
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:17:46 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-04-12 16:18 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 19:29 [Bug middle-end/50040] New: [4.5/4.6/4.7 Regression] missed warning: ‘x.y’ is used uninitialized in this function jan.kratochvil at redhat dot com
2011-08-11 10:04 ` [Bug middle-end/50040] " rguenth at gcc dot gnu.org
2011-08-11 10:42 ` jan.kratochvil at redhat dot com
2011-08-11 10:58 ` rguenth at gcc dot gnu.org
2011-08-11 11:23 ` jan.kratochvil at redhat dot com
2011-08-11 14:29 ` rguenth at gcc dot gnu.org
2011-08-11 14:30 ` [Bug middle-end/50040] [4.5/4.6 " rguenth at gcc dot gnu.org
2011-11-02 9:51 ` rguenth at gcc dot gnu.org
2011-11-03 15:15 ` rguenth at gcc dot gnu.org
2012-01-03 13:31 ` rguenth at gcc dot gnu.org
2012-01-03 13:32 ` rguenth at gcc dot gnu.org
2012-01-03 15:17 ` rguenth at gcc dot gnu.org
2012-01-03 16:55 ` sezeroz at gmail dot com
2012-06-20 13:03 ` rguenth at gcc dot gnu.org
2012-07-02 11:40 ` rguenth at gcc dot gnu.org
2013-04-12 16:18 ` [Bug middle-end/50040] [4.6 " 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).