4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Haley
I've had a gcj bug report saying that some CNI code has ceased to work on PPC 32, but I'm not sure that this is a gcj bug at all. The bug is that gcj and g++ no longer have comptabile class layout -- members are at different offsets. If you run the appended code with g++ version 3.4.1, you get

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Joe Buck
On Mon, Apr 04, 2005 at 04:07:49PM +0100, Andrew Haley wrote: > I've had a gcj bug report saying that some CNI code has ceased to work > on PPC 32, but I'm not sure that this is a gcj bug at all. The bug is > that gcj and g++ no longer have comptabile class layout -- members are > at different off

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Giovanni Bajo
Andrew Haley <[EMAIL PROTECTED]> wrote: > public: > long long __attribute__((aligned(__alignof__( ::java::lang::Object l; I don't recall the exact details, but I have fixed a couple of bugs about the use of __alignof__ and attribute aligned on members of classes (maybe templates only?). Ar

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Haley
Joe Buck writes: > On Mon, Apr 04, 2005 at 04:07:49PM +0100, Andrew Haley wrote: > > I've had a gcj bug report saying that some CNI code has ceased to work > > on PPC 32, but I'm not sure that this is a gcj bug at all. The bug is > > that gcj and g++ no longer have comptabile class layout -- m

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Haley
Giovanni Bajo writes: > Andrew Haley <[EMAIL PROTECTED]> wrote: > > > public: > > long long __attribute__((aligned(__alignof__( ::java::lang::Object > l; > > I don't recall the exact details, but I have fixed a couple of bugs about > the use of __alignof__ and attribute aligned on

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Giovanni Bajo
Andrew Haley <[EMAIL PROTECTED]> wrote: > > > public: > > > long long __attribute__((aligned(__alignof__( ::java::lang::Object > > l; > > > > I don't recall the exact details, but I have fixed a couple of bugs about > > the use of __alignof__ and attribute aligned on members of classe

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Haley
Giovanni Bajo writes: > Andrew Haley <[EMAIL PROTECTED]> wrote: > > > > > public: > > > > long long __attribute__((aligned(__alignof__( ::java::lang::Object > > l; > > > > > > I don't recall the exact details, but I have fixed a couple of > > > bugs about the use of __alignof_

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Pinski
On Apr 4, 2005, at 1:01 PM, Andrew Haley wrote: Giovanni Bajo writes: Is __alignof__( ::java::lang::Object ) the same under 3.4 and 4.0 in the first place? Yes, 4 in both cases. And here is the most reduced testcase (and it shows that the C and C++ front-ends don't agree any more which is bad): #

Re: 4.0 regression: g++ class layout on PPC32 has changed

2005-04-04 Thread Andrew Pinski
On Apr 4, 2005, at 2:33 PM, Andrew Pinski wrote: On Apr 4, 2005, at 1:01 PM, Andrew Haley wrote: Giovanni Bajo writes: Is __alignof__( ::java::lang::Object ) the same under 3.4 and 4.0 in the first place? Yes, 4 in both cases. And here is the most reduced testcase (and it shows that the C and C++