This is the mail archive of the
mailing list for the GCC project.
Re: PR 6212
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));
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.
No, I think a proper solution is to let highest_pow2_factor increase
the alignment, but not decrease it. Assuming the alignment of the
type *that we dereference* would match the behaviour of previous