This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to debug ssa optimizer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]