public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
@ 2006-07-17 12:51 rguenth at gcc dot gnu dot org
2006-07-17 12:51 ` [Bug tree-optimization/28410] " rguenth at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-17 12:51 UTC (permalink / raw)
To: gcc-bugs
struct Bar { int p; };
struct Foo { struct Bar *p; };
int foo(struct Foo *f)
{
f->p->p = 1;
bar(f);
return f->p->p;
}
.alias1:
# VUSE <SMT.4_6>;
D.1528_2 = f_1->p;
# SMT.5_8 = V_MAY_DEF <SMT.5_7>;
D.1528_2->p = 1;
# .GLOBAL_VAR_10 = V_MAY_DEF <.GLOBAL_VAR_9>;
bar (f_1);
# VUSE <SMT.4_6>;
D.1528_3 = f_1->p;
# VUSE <SMT.5_8>;
D.1529_4 = D.1528_3->p;
return D.1529_4;
and fre then does:
# VUSE <SMT.4_6>;
D.1528_2 = f_1->p;
# SMT.5_8 = V_MAY_DEF <SMT.5_7>;
D.1528_2->p = 1;
# .GLOBAL_VAR_10 = V_MAY_DEF <.GLOBAL_VAR_9>;
bar (f_1);
D.1528_3 = D.1528_2;
# VUSE <SMT.5_8>;
D.1529_4 = D.1528_3->p;
return D.1529_4;
miscompiles kde4.
--
Summary: [4.2 Regression] Wrong aliasing with global var grouping
during call clobbering
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code, alias
Severity: blocker
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
@ 2006-07-17 12:51 ` rguenth at gcc dot gnu dot org
2006-07-17 12:52 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-17 12:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-07-17 12:51 -------
Oh - build with -O2 --param global-var-threshold=1
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
2006-07-17 12:51 ` [Bug tree-optimization/28410] " rguenth at gcc dot gnu dot org
@ 2006-07-17 12:52 ` pinskia at gcc dot gnu dot org
2006-07-17 13:20 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-17 12:52 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
2006-07-17 12:51 ` [Bug tree-optimization/28410] " rguenth at gcc dot gnu dot org
2006-07-17 12:52 ` pinskia at gcc dot gnu dot org
@ 2006-07-17 13:20 ` pinskia at gcc dot gnu dot org
2006-07-17 13:29 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-17 13:20 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-07-17 13:20 ` pinskia at gcc dot gnu dot org
@ 2006-07-17 13:29 ` rguenth at gcc dot gnu dot org
2006-07-17 13:31 ` dnovillo at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-17 13:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-07-17 13:29 -------
Runnable testcase:
extern void abort(void);
struct Bar { int p; };
struct Foo { struct Bar *p; };
struct Bar p0 = { 0 };
struct Bar p1 = { 1 };
void bar(struct Foo *f)
{
f->p = &p0;
}
int foo(struct Foo *f)
{
f->p->p = 1;
bar(f);
return f->p->p;
}
int main()
{
struct Foo f;
f.p = &p1;
if (foo(&f) != 0)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-07-17 13:29 ` rguenth at gcc dot gnu dot org
@ 2006-07-17 13:31 ` dnovillo at gcc dot gnu dot org
2006-07-18 13:25 ` dnovillo at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-07-17 13:31 UTC (permalink / raw)
To: gcc-bugs
--
dnovillo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-07-17 13:30:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-07-17 13:31 ` dnovillo at gcc dot gnu dot org
@ 2006-07-18 13:25 ` dnovillo at gcc dot gnu dot org
2006-07-18 14:06 ` dberlin at dberlin dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-07-18 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dnovillo at gcc dot gnu dot org 2006-07-18 13:25 -------
Testing patch. The bug was in the alias pruning code. We need to handle
.GLOBAL_VAR in access_can_touch_variable. A memory reference that uses a
call-clobbered memory tag should always be considered to touch .GLOBAL_VAR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-07-18 13:25 ` dnovillo at gcc dot gnu dot org
@ 2006-07-18 14:06 ` dberlin at dberlin dot org
2006-07-18 17:28 ` dnovillo at gcc dot gnu dot org
2006-07-18 17:29 ` dnovillo at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dberlin at dberlin dot org @ 2006-07-18 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dberlin at gcc dot gnu dot org 2006-07-18 14:06 -------
Subject: Re: [4.2 Regression] Wrong aliasing
with global var grouping during call clobbering
dnovillo at gcc dot gnu dot org wrote:
> ------- Comment #3 from dnovillo at gcc dot gnu dot org 2006-07-18 13:25 -------
>
> Testing patch. The bug was in the alias pruning code. We need to handle
> .GLOBAL_VAR in access_can_touch_variable. A memory reference that uses a
> call-clobbered memory tag should always be considered to touch .GLOBAL_VAR.
Yay for random invariants!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-07-18 14:06 ` dberlin at dberlin dot org
@ 2006-07-18 17:28 ` dnovillo at gcc dot gnu dot org
2006-07-18 17:29 ` dnovillo at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-07-18 17:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dnovillo at gcc dot gnu dot org 2006-07-18 17:28 -------
Subject: Bug 28410
Author: dnovillo
Date: Tue Jul 18 17:27:57 2006
New Revision: 115564
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115564
Log:
PR 28410
* tree-ssa-operands.c (access_can_touch_variable): Update
comment.
Return true if ALIAS is .GLOBAL_VAR.
testsuite/ChangeLog
PR 28410
* gcc.dg/tree-ssa/pr28410.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr28410.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-operands.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-07-18 17:28 ` dnovillo at gcc dot gnu dot org
@ 2006-07-18 17:29 ` dnovillo at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-07-18 17:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dnovillo at gcc dot gnu dot org 2006-07-18 17:29 -------
Fixed. http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00786.html
--
dnovillo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28410
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-07-18 17:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-17 12:51 [Bug tree-optimization/28410] New: [4.2 Regression] Wrong aliasing with global var grouping during call clobbering rguenth at gcc dot gnu dot org
2006-07-17 12:51 ` [Bug tree-optimization/28410] " rguenth at gcc dot gnu dot org
2006-07-17 12:52 ` pinskia at gcc dot gnu dot org
2006-07-17 13:20 ` pinskia at gcc dot gnu dot org
2006-07-17 13:29 ` rguenth at gcc dot gnu dot org
2006-07-17 13:31 ` dnovillo at gcc dot gnu dot org
2006-07-18 13:25 ` dnovillo at gcc dot gnu dot org
2006-07-18 14:06 ` dberlin at dberlin dot org
2006-07-18 17:28 ` dnovillo at gcc dot gnu dot org
2006-07-18 17:29 ` dnovillo 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).