How to debug ssa optimizer
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sun Jun 20 16:33:00 GMT 2004
> I was just about to add a test to check_pointer_types_r to disallow it.
:-) All you'd have to do is remove the one that's already there.
Indeed I tried that and gave up.
As much as it's a mess, I think we *do* have to allow an ADDR_EXPR of
something that's an ARRAY_TYPE to also be a pointer to the element type.
Otherwise, we have no good way of representing:
char foo[] = "abcd";
char *p = foo;
But we have to be careful in that case not to simplify
<INDIRECT_REF <ADDR_EXPR <VAR_DECL foo>>
to simply be <VAR_DECL foo> if the type of the INDIRECT_REF is that
of the element type instead of the array type.
That didn't used to happen, but something I changed made it do that.
>From c-cppbuiltin.i.t33.copyrename2:
<L191>:;
v.740_386 = &version_string;
T.211_530 = *v.740_386;
if (T.211_530 == 0) goto <L4>; else goto <L3>;
and from c-cppbuiltin.i.t34.dom2:
<L191>:;
v.740_199 = &version_string;
T.211_345 = version_string;
if (T.211_345 == 0) goto <L201>; else goto <L3>;
The second assignment is a problem! I have to see who's making it.
More information about the Gcc
mailing list