From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31719 invoked by alias); 6 Sep 2004 22:01:26 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31710 invoked from network); 6 Sep 2004 22:01:25 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 6 Sep 2004 22:01:25 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA21041; Mon, 6 Sep 04 18:04:24 EDT Date: Mon, 06 Sep 2004 22:01:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10409062204.AA21041@vlsi1.ultra.nyu.edu> To: hubicka@ucw.cz Subject: Re: Ada bootstrap broken on x86 and x86_64 Cc: gcc@gcc.gnu.org X-SW-Source: 2004-09/txt/msg00262.txt.bz2 this should fix the problem. I think that the actual value of ADDR_EXPR (VIEW_CONVERT_EXPR (something)) is equivalent to ADDR_EXPR (something) so I can just ignore it when computing the offsets. Yes, but a lot of code code in peel_address looks quite wrong to me. You should never use TREE_INT_CST_LOW without checking that there's no high part set: that's what the function tree_low_cst is all about. I added that function back in March of 2000: nobody should be using TREE_CST_CST_LOW in this way. Moreover, the offset for a COMPONENT_REF must include DECL_FIELD_OFFSET and for an ARRAY_REF, you have to take into account the lower bound. he new functions in stor-layout.c (array_ref_low_bound, etc) should be used for this. But why not simply use get_inner_reference so that everybody finds offsets the same way? The bug with VIEW_CONVERT_EXPR couldn't have occurred if that were used.