This is the mail archive of the
mailing list for the GCC project.
Re: PR 6212
--On Monday, May 06, 2002 03:50:14 PM -0700 Richard Henderson
> 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.
> int foo(int *p)
> return *((char *)p);
> char c __attribute__((aligned));
> int bar()
> return foo((int *)&c);
> 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 email@example.com
CodeSourcery, LLC http://www.codesourcery.com