[Bug tree-optimization/25737] ACATS c974001 c974013 hang with struct aliasing
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 24 18:23:00 GMT 2006
------- Comment #37 from ebotcazou at gcc dot gnu dot org 2006-09-24 18:23 -------
> No, really, you don't seem to understand.
> If you respect these DECL_NONADDRESSABLE_P or
> TYPE_NONALIASED_COMPONENT flags, you are going to make them unaliased.
> Your whole bug report is that they are not aliased and should be, and
> that the loads and stores currently don't interfere but should.
I think I understand your viewpoint: the name of TYPE_NONALIASED_COMPONENT
and DECL_NONADDRESSABLE_P seems to imply than setting them would always
result in less V_MAY_DEF's in the code. But...
> Diego, the short summary is that Eric has some Ada testcases where we
> end up with less V_MAY_DEF's than he thinks should. He believes that
> respecting these flags, which specify you cannot form the address of a
> certain component, etc, will somehow cause him to end up with more
> aliasing and fix his testcase by anything other than luck.
...that's not so simple. If you look at how these flags work in GCC 3.x,
you'll see that setting them has some impact on the alias sets used to access
memory references, via can_address_p and the MEM_KEEP_ALIAS_SET_P flag.
In GCC 4 dialect, this would result in different V_MAY_DEF's, not less.
I'm not saying that this is a sane design or that we should try to replicate
it in GCC 4, I'm just saying that for the time being struct aliasing totally
overlooks this mechanism and doesn't work for Ada because of that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25737
More information about the Gcc-bugs
mailing list