public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA
@ 2010-05-14 9:02 jakub at gcc dot gnu dot org
2010-05-14 9:02 ` [Bug middle-end/44133] " jakub at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-14 9:02 UTC (permalink / raw)
To: gcc-bugs
struct S { int i, j; };
int foo (int l)
{
struct S s;
s.j = l - 22;
return s.i + s.j;
}
with -O2 -W -Wall in 4.4 this used to warn:
v.c: In function 'foo':
v.c:6: warning: 's.i' is used uninitialized in this function
but with 4.5+ it warns:
v.c: In function 'foo':
v.c:6:11: warning: '({anonymous})' is used uninitialized in this function
[-Wuninitialized]
For:
struct S { int i, j; };
int foo (int l)
{
struct S s;
if (l > 126)
{
s.j = l - 22;
return s.i + s.j;
}
s.i = 12;
s.j = l + 40;
return s.i + s.j;
}
the warning is ok in both 4.4 and 4.5+.
I'd say that SRA should add the D.XXXX = s$i; stmts, perhaps right before
D.XXXX uses.
--
Summary: [4.5/4.6 Regression] Uninit warning regression with new
SRA
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5/4.6 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
@ 2010-05-14 9:02 ` jakub at gcc dot gnu dot org
2010-05-14 9:47 ` jamborm at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-05-14 9:02 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5/4.6 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
2010-05-14 9:02 ` [Bug middle-end/44133] " jakub at gcc dot gnu dot org
@ 2010-05-14 9:47 ` jamborm at gcc dot gnu dot org
2010-05-16 21:10 ` jamborm at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-05-14 9:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jamborm at gcc dot gnu dot org 2010-05-14 09:47 -------
Mine.
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jamborm at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-05-14 09:47:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5/4.6 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
2010-05-14 9:02 ` [Bug middle-end/44133] " jakub at gcc dot gnu dot org
2010-05-14 9:47 ` jamborm at gcc dot gnu dot org
@ 2010-05-16 21:10 ` jamborm at gcc dot gnu dot org
2010-05-17 12:49 ` jamborm at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-05-16 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jamborm at gcc dot gnu dot org 2010-05-16 21:09 -------
Patch posted to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01209.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5/4.6 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-05-16 21:10 ` jamborm at gcc dot gnu dot org
@ 2010-05-17 12:49 ` jamborm at gcc dot gnu dot org
2010-05-19 13:00 ` [Bug middle-end/44133] [4.5 " rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-05-17 12:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jamborm at gcc dot gnu dot org 2010-05-17 12:48 -------
Subject: Bug 44133
Author: jamborm
Date: Mon May 17 12:48:34 2010
New Revision: 159482
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159482
Log:
2010-05-17 Martin Jambor <mjambor@suse.cz>
PR middle-end/44133
* tree-sra.c (create_access_replacement): New parameter rename, mark
the replaement for renaming only when it is true.
(get_access_replacement): Pass true in the rename parameter of
create_access_replacement.
(get_unrenamed_access_replacement): New function.
(replace_uses_with_default_def_ssa_name): New parameter racc, get the
replacement declaration from it.
* testsuite/gcc.dg/tree-ssa/pr44133.c: New test.
* testsuite/gcc.dg/tree-ssa/sra-9.c: Make the scan regular
expression more precise.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr44133.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/sra-9.c
trunk/gcc/tree-sra.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-05-17 12:49 ` jamborm at gcc dot gnu dot org
@ 2010-05-19 13:00 ` rguenth at gcc dot gnu dot org
2010-05-21 17:37 ` jamborm at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-19 13:00 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Known to work| |4.6.0
Priority|P3 |P2
Summary|[4.5/4.6 Regression] Uninit |[4.5 Regression] Uninit
|warning regression with new |warning regression with new
|SRA |SRA
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-05-19 13:00 ` [Bug middle-end/44133] [4.5 " rguenth at gcc dot gnu dot org
@ 2010-05-21 17:37 ` jamborm at gcc dot gnu dot org
2010-06-17 13:14 ` jamborm at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-05-21 17:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jamborm at gcc dot gnu dot org 2010-05-21 17:36 -------
On the 4.5 branch we have a different problem, the warning is not
issued at all. The patch does not apply because we treat scalar loads
differently. The easiest way would be to backport this behavior to
4.5:
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00440.html
and then commit this change on top of it. That would of course change
the code generated by SRA in general but it does not seem too risky
now. What do you think?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-05-21 17:37 ` jamborm at gcc dot gnu dot org
@ 2010-06-17 13:14 ` jamborm at gcc dot gnu dot org
2010-06-29 13:09 ` jamborm at gcc dot gnu dot org
2010-06-29 13:11 ` jamborm at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-17 13:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jamborm at gcc dot gnu dot org 2010-06-17 13:14 -------
A request for approval to backport the two patches sent to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01663.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-06-17 13:14 ` jamborm at gcc dot gnu dot org
@ 2010-06-29 13:09 ` jamborm at gcc dot gnu dot org
2010-06-29 13:11 ` jamborm at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-29 13:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jamborm at gcc dot gnu dot org 2010-06-29 13:09 -------
Subject: Bug 44133
Author: jamborm
Date: Tue Jun 29 13:08:46 2010
New Revision: 161532
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161532
Log:
2010-06-29 Martin Jambor <mjambor@suse.cz>
Backport from mainline
2010-05-17 Martin Jambor <mjambor@suse.cz>
PR middle-end/44133
* tree-sra.c (create_access_replacement): New parameter rename, mark
the replaement for renaming only when it is true.
(get_access_replacement): Pass true in the rename parameter of
create_access_replacement.
(get_unrenamed_access_replacement): New function.
(replace_uses_with_default_def_ssa_name): New parameter racc, get the
replacement declaration from it.
* testsuite/gcc.dg/tree-ssa/pr44133.c: New test.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr44133.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-sra.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/44133] [4.5 Regression] Uninit warning regression with new SRA
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-06-29 13:09 ` jamborm at gcc dot gnu dot org
@ 2010-06-29 13:11 ` jamborm at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-29 13:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jamborm at gcc dot gnu dot org 2010-06-29 13:10 -------
This is now fixed on both the trunk and the 4.5 branch.
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44133
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-06-29 13:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-14 9:02 [Bug middle-end/44133] New: [4.5/4.6 Regression] Uninit warning regression with new SRA jakub at gcc dot gnu dot org
2010-05-14 9:02 ` [Bug middle-end/44133] " jakub at gcc dot gnu dot org
2010-05-14 9:47 ` jamborm at gcc dot gnu dot org
2010-05-16 21:10 ` jamborm at gcc dot gnu dot org
2010-05-17 12:49 ` jamborm at gcc dot gnu dot org
2010-05-19 13:00 ` [Bug middle-end/44133] [4.5 " rguenth at gcc dot gnu dot org
2010-05-21 17:37 ` jamborm at gcc dot gnu dot org
2010-06-17 13:14 ` jamborm at gcc dot gnu dot org
2010-06-29 13:09 ` jamborm at gcc dot gnu dot org
2010-06-29 13:11 ` jamborm at gcc dot gnu dot 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).