From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22998 invoked by alias); 25 Sep 2006 01:27:39 -0000 Received: (qmail 22945 invoked by alias); 25 Sep 2006 01:27:28 -0000 Date: Mon, 25 Sep 2006 01:27:00 -0000 Message-ID: <20060925012728.22944.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/25737] ACATS c974001 c974013 hang with struct aliasing In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dberlin at dberlin dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg02315.txt.bz2 List-Id: ------- Comment #38 from dberlin at gcc dot gnu dot org 2006-09-25 01:27 ------- Subject: Re: ACATS c974001 c974013 hang with struct aliasing On 24 Sep 2006 18:23:41 -0000, ebotcazou at gcc dot gnu dot org wrote: > > > ------- 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... > The name, and all the documentation, which say they cannot be addressed, which means they cannot be pointed to by any pointer, which means they are unaliased. > > 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. If so, then you've both hacked around something more funamental, and the documentation of all these flags don't actually match what you really mean. > > 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. Okay, and i'm saying i don't plan on accepting fixes that appear to hack around well accepted infrastructure to try to fix symptoms. Really. That's all. I'm not going to approve patches that randomly skip fields because it seems to get the right result sometimes. If you want to try to explain what all this is actually trying to do, i'm happy to work with you to come up with a sane solution. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25737