------- Comment #13 from mark at codesourcery dot com  2005-10-11 14:47 -------
Subject: Re:  [4.0 regression] mem_fun* code fine
 with -O1, bus error with -O2

ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #12 from ebotcazou at gcc dot gnu dot org  2005-10-11 14:41 
> -------
> 
>>This certainly is a bug in the back-end, not a bug in the default
>>location of the v-bit.  You shouldn't need to break the C++ ABI on SPARC
>>to fix this bug.
> 
> 
> Right, I was confused, I thought __pfn was dereferenced itself.
> 
> 
>>However, I'm not sure why you're seeing a 4-byte load from an unaligned
>>address.
> 
> 
> Because p is a pointer to Class and Class has alignment 1.  I guess the first
> branch of the expression works when Class contains a pointer to the vtable,
> hence has alignment 4.

Ah. I think that would best be fixed in the front-end, then.  If the
class doesn't have a virtual pointer, then there's no need to generate
the conditional expression; avoiding that will not only fix this bug,
but make the code generated by the front-end easier for the middle end
to process.  Please re-assign to me.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23585

Reply via email to