This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
target/7559: kdelibs miscompilation
- From: 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
- Date: 9 Aug 2002 16:20:40 -0000
- Subject: target/7559: kdelibs miscompilation
- Reply-to: gbeauchesne at mandrakesoft dot com
>Number: 7559
>Category: target
>Synopsis: kdelibs miscompilation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Aug 09 09:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gwenole Beauchesne
>Release: MDK gcc 3.1.1-1mdk, SuSE gcc-3.1-8
>Organization:
>Environment:
x86_64-mandrake-linux-gnu
>Description:
kdecore from kdelibs 3.0.2 is miscompiled on x86-64.
>How-To-Repeat:
The following testcase, extracted from kdecore/kwinmodule.cpp (KWinModule::workArea) and kdecore/netwm.cpp (NETRootInfo::workArea) will produce incorrect results in any case but with inlining.
<testcase>
extern void abort();
struct A {
A() : x(100), y(100) { }
int x, y;
};
struct B {
B() : x(100), y(100) { }
int x, y;
};
struct R {
A a;
B b;
};
class X {
R x;
public:
R get() const;
};
R X::get() const {
return x;
}
int main() {
X x;
R r = x.get();
if (!(r.a.x == 100 && r.a.y == 100
&& r.b.x == 100 && r.b.y == 100))
abort();
return 0;
}
</testcase>
A net visible effect is KDesktop window size being reduced to 0x0, 1x0.
>Fix:
No workaround known yet.
>Release-Note:
>Audit-Trail:
>Unformatted: