public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gbeauchesne@mandrakesoft.com
To: gcc-gnats@gcc.gnu.org
Cc: david@mandrakesoft.com, aj@suse.de, jh@suse.cz
Subject: target/7559: kdelibs miscompilation
Date: Fri, 09 Aug 2002 09:56:00 -0000	[thread overview]
Message-ID: <20020809162040.10617.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-08-09 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-09  9:56 gbeauchesne [this message]
2002-08-09 10:16 Gwenole Beauchesne
2002-08-09 11:06 Gwenole Beauchesne
2002-08-10  6:16 Gwenole Beauchesne
2002-08-10  6:46 Jan Hubicka
2002-08-11  9:46 Andreas Jaeger
2002-10-06  9:55 aj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020809162040.10617.qmail@sources.redhat.com \
    --to=gbeauchesne@mandrakesoft.com \
    --cc=aj@suse.de \
    --cc=david@mandrakesoft.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=jh@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).