From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22452 invoked by alias); 6 May 2002 23:01:18 -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 22442 invoked from network); 6 May 2002 23:01:15 -0000 Received: from unknown (HELO gandalf.codesourcery.com) (66.60.148.227) by sources.redhat.com with SMTP; 6 May 2002 23:01:15 -0000 Received: from gandalf.codesourcery.com (localhost.localdomain [127.0.0.1]) by gandalf.codesourcery.com (8.11.6/8.11.6) with ESMTP id g46MuqL30212; Mon, 6 May 2002 15:56:52 -0700 Date: Mon, 06 May 2002 16:01:00 -0000 From: Mark Mitchell To: Richard Henderson cc: Daniel Jacobowitz , Richard Kenner , "gcc@gcc.gnu.org" Subject: Re: PR 6212 Message-ID: <22900000.1020725812@gandalf.codesourcery.com> In-Reply-To: <20020506155014.C13553@redhat.com> References: <10205061546.AA20002@vlsi1.ultra.nyu.edu> <3450000.1020700327@gandalf.codesourcery.com> <20020506214922.GA22459@nevyn.them.org> <11420000.1020722169@gandalf.codesourcery.com> <20020506155014.C13553@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-05/txt/msg00431.txt.bz2 --On Monday, May 06, 2002 03:50:14 PM -0700 Richard Henderson wrote: > On Mon, May 06, 2002 at 02:56:09PM -0700, Mark Mitchell wrote: >> I can verify the patch on GNU/Linux, too. Is there someone who would >> care to try this on a MIPS or Alpha box to confirm that it works OK >> there? (Alpha was also affected by this problem.) > > I'll test Alpha, but I'm pretty sure this patch is incorrect. > > Consider > > int foo(int *p) > { > return *((char *)p); > } > > char c[2] __attribute__((aligned)); > > int bar() > { > return foo((int *)&c[1]); > } > > Since we recurse all the way down to the PARM_DECL, we decide that P > is 4-byte aligned. We already discussed cases with pointers having > strange values (so long as they weren't dereferenced) and declared > them acceptable in gcc. Yup, that's valid C. For now, highest_pow2_factor is only used as an argument to offset_address, and in offset_address, there's already a "MIN"; the offset address is never more aligned than the original address. Does that help? -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com