This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/7559: kdelibs miscompilation
- From: Gwenole Beauchesne <gbeauchesne at mandrakesoft dot com>
- To: gcc-gnats at gcc dot gnu dot org
- Cc: david at mandrakesoft dot com, <aj at suse dot de>, <jh at suse dot cz>, <nobody at gcc dot gnu dot org>, <gcc-prs at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>
- Date: Fri, 9 Aug 2002 19:13:46 +0200 (CEST)
- Subject: Re: target/7559: kdelibs miscompilation
> Also verified to fail with:
> GNU C++ version 3.2 20020809 (prerelease) (x86_64-unknown-linux-gnu)
The following C testcase is equivalent in miscompiled-behavior. If you
don't want to bother compiling the C++ front-end for tests. ;-)
extern void abort();
struct A {
int x, y;
};
struct B {
int x, y;
};
struct R {
struct A a;
struct B b;
};
struct R X = { { 100, 100 }, { 100, 100 } };
struct R get() {
return X;
}
int main() {
struct R r = get();
if (!(r.a.x == 100 && r.a.y == 100
&& r.b.x == 100 && r.b.y == 100))
abort();
return 0;
}