* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
@ 2005-01-25 23:26 ` steven at gcc dot gnu dot org
2005-01-25 23:33 ` steven at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 23:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19616
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-01-25 23:26:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
2005-01-25 23:26 ` [Bug tree-optimization/19633] " steven at gcc dot gnu dot org
@ 2005-01-25 23:33 ` steven at gcc dot gnu dot org
2005-01-26 23:34 ` dnovillo at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 23:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-25 23:32 -------
;; Function foo (foo)
Visiting use-def links for 0B
Visiting use-def links for &bD.1128.sD.1123
foo: Total number of aliased vops: 0
Referenced variables in foo: 4
Variable: cD.1131, UID 0, struct S *, type memory tag: TMT.0D.1138
Variable: aD.1127, UID 1, intD.0, default def: aD.1127_3
Variable: bD.1128, UID 2, struct T, is an alias tag, is addressable, call
clobbered, default def: bD.1128_5
Variable: TMT.0D.1138, UID 3, struct S, is addressable, is global, call
clobbered, may aliases: { bD.1128 }
Alias statistics for foo
Total alias queries: 1
Total alias mayalias results: 1
Total alias noalias results: 0
Total simple queries: 1
Total simple resolved: 0
Total TBAA queries: 1
Total TBAA resolved: 0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
2005-01-25 23:26 ` [Bug tree-optimization/19633] " steven at gcc dot gnu dot org
2005-01-25 23:33 ` steven at gcc dot gnu dot org
@ 2005-01-26 23:34 ` dnovillo at gcc dot gnu dot org
2005-01-27 4:45 ` cvs-commit at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-01-26 23:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2005-01-26 23:34 -------
Testing patch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-01-26 23:34 ` dnovillo at gcc dot gnu dot org
@ 2005-01-27 4:45 ` cvs-commit at gcc dot gnu dot org
2005-01-27 4:58 ` dnovillo at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-27 4:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-27 04:45 -------
Subject: Bug 19633
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dnovillo@gcc.gnu.org 2005-01-27 04:45:20
Modified files:
gcc : ChangeLog tree-outof-ssa.c tree-ssa-alias.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: pr19633.c
gcc/testsuite/gcc.dg/tree-ssa: pr19633.c
Log message:
PR tree-optimization/19633
* tree-ssa-alias.c (ptr_is_dereferenced_by): Also handle
CALL_EXPRs.
(maybe_create_global_var): Do not create .GLOBAL_VAR if there
are no call-clobbered variables.
* tree-outof-ssa.c (check_replaceable): Return false for calls
with side-effects.
testsuite/ChangeLog
PR tree-optimization/19633
* gcc.dg/pr19633.c: New test.
* gcc.dg/tree-ssa/pr19633.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7297&r2=2.7298
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-outof-ssa.c.diff?cvsroot=gcc&r1=2.41&r2=2.42
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.66&r2=2.67
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4940&r2=1.4941
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr19633.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr19633.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-01-27 4:45 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-27 4:58 ` dnovillo at gcc dot gnu dot org
2005-01-30 20:51 ` steven at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-01-27 4:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2005-01-27 04:58 -------
Fix: http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01969.html.
This does not completely get you the tail call you were looking for, but it does
address the address escaping problem. I would probably just close it as we
already have PRs for the TREE_ADDRESSABLE arguments in the call.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-01-27 4:58 ` dnovillo at gcc dot gnu dot org
@ 2005-01-30 20:51 ` steven at gcc dot gnu dot org
2005-02-01 20:30 ` cvs-commit at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-30 20:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-30 20:50 -------
I still see "b" marked as "call clobbered":
struct S { int w, x, y, z; };
struct T { int r; struct S s; };
void bar(struct S, int);
void foo(int a, struct T b)
{
struct S *c = 0;
if (a)
c = &b.s;
bar (*c, a);
}
--> .alias4 dump
;; Function foo (foo)
Visiting use-def links for 0B
Visiting use-def links for &bD.1459.sD.1454
foo: Total number of aliased vops: 1
Referenced variables in foo: 4
Variable: cD.1462, UID 0, struct S *, type memory tag: TMT.0D.1469
Variable: aD.1458, UID 1, intD.0, default def: aD.1458_3
Variable: bD.1459, UID 2, struct T, is an alias tag, is addressable, call
clobbered, default def: bD.1459_5
Variable: TMT.0D.1469, UID 3, struct S, is addressable, is global, call
clobbered, may aliases: { bD.1459 }
(...)
Aliased symbols
bD.1459, UID 2, struct T, is an alias tag, is addressable, call clobbered,
default def: bD.1459_5
TMT.0D.1469, UID 3, struct S, is addressable, is global, call clobbered, may
aliases: { bD.1459 }
Dereferenced pointers
cD.1462, UID 0, struct S *, type memory tag: TMT.0D.1469
Type memory tags
TMT.0D.1469, UID 3, struct S, is addressable, is global, call clobbered, may
aliases: { bD.1459 }
(...)
foo (aD.1458, bD.1459)
{
struct S * cD.1462;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
if (aD.1458_3 != 0) goto <L0>; else goto <L1>;
# SUCC: 1 [67.0%] (true,exec) 2 [33.0%] (false,exec)
# BLOCK 1
# PRED: 0 [67.0%] (true,exec)
<L0>:;
# SUCC: 2 [100.0%] (fallthru,exec)
# BLOCK 2
# PRED: 0 [33.0%] (false,exec) 1 [100.0%] (fallthru,exec)
# cD.1462_1 = PHI <0B(0), &bD.1459.sD.1454(1)>;
<L1>:;
# bD.1459_6 = V_MAY_DEF <bD.1459_5>;
bar (*cD.1462_1, aD.1458_3);
return;
# SUCC: EXIT [100.0%]
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-01-30 20:51 ` steven at gcc dot gnu dot org
@ 2005-02-01 20:30 ` cvs-commit at gcc dot gnu dot org
2005-02-18 14:32 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-01 20:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-01 20:30 -------
Subject: Bug 19633
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dnovillo@gcc.gnu.org 2005-02-01 20:30:08
Modified files:
gcc : ChangeLog tree-flow.h tree-ssa-alias.c
gcc/testsuite : ChangeLog
gcc/testsuite/gcc.dg: pr19633.c
Added files:
gcc/testsuite/gcc.dg: pr19633-1.c
Log message:
PR tree-optimization/19633
* tree-flow.h (struct ptr_info_def): Add field 'pt_null'.
* tree-ssa-alias.c (init_alias_info): Initialize.
(merge_pointed_to_info): Set.
(add_pointed_to_expr): Set pt_null if EXPR is a NULL pointer.
(dump_points_to_info_for): Show value of pt_null.
(struct count_ptr_d): Declare.
(find_ptr_dereference): Remove.
(ptr_is_dereferenced_by): Remove.
(count_ptr_derefs): New local function.
(count_uses_and_derefs): New local function.
(compute_points_to_and_addr_escape): Call it. If the number
of dereferences is greater than zero, mark the pointer as
dereferenced. If there are fewer dereferences than uses of
the pointer, the pointer's value escapes.
testsuite/ChangeLog
PR tree-optimization/19633
* testsuite/gcc.dg/pr19633-1.c: New test.
* testsuite/gcc.dg/pr19633.c: Tweak to make pointer point
to NULL or a symbol.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7365&r2=2.7366
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&r1=2.78&r2=2.79
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.67&r2=2.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4973&r2=1.4974
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr19633-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr19633.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-02-01 20:30 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-18 14:32 ` pinskia at gcc dot gnu dot org
2005-05-21 12:52 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-18 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-18 03:22 -------
Hmm, the testcase now fails on ppc-darwin.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-02-18 14:32 ` pinskia at gcc dot gnu dot org
@ 2005-05-21 12:52 ` pinskia at gcc dot gnu dot org
2005-06-13 13:41 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 12:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-21 12:52 -------
Should this be closed?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-05-21 12:52 ` pinskia at gcc dot gnu dot org
@ 2005-06-13 13:41 ` steven at gcc dot gnu dot org
2005-06-13 13:45 ` dnovillo at redhat dot com
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-06-13 13:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-06-13 13:41 -------
Ping Diego, should this be closed??
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-06-13 13:41 ` steven at gcc dot gnu dot org
@ 2005-06-13 13:45 ` dnovillo at redhat dot com
2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
2005-06-18 23:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: dnovillo at redhat dot com @ 2005-06-13 13:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at redhat dot com 2005-06-13 13:44 -------
Subject: Re: local address incorrectly thought to escape
On Mon, Jun 13, 2005 at 01:41:06PM -0000, steven at gcc dot gnu dot org wrote:
> Ping Diego, should this be closed??
>
If the testcase now works on ppc-darwin (see comment #7), then
yes.
Diego.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-06-13 13:45 ` dnovillo at redhat dot com
@ 2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
2005-06-18 23:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-13 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-13 13:47 -------
(In reply to comment #10)
> If the testcase now works on ppc-darwin (see comment #7), then
> yes.
Yes it does.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/19633] local address incorrectly thought to escape
2005-01-25 23:22 [Bug tree-optimization/19633] New: local address incorrectly thought to escape rth at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
@ 2005-06-18 23:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-18 23:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633
^ permalink raw reply [flat|nested] 14+ messages in thread