------- 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