From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1087 invoked by alias); 10 Aug 2002 13:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1066 invoked by uid 71); 10 Aug 2002 13:16:01 -0000 Date: Sat, 10 Aug 2002 06:46:00 -0000 Message-ID: <20020810131601.1065.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jan Hubicka Subject: Re: target/7559: kdelibs miscompilation Reply-To: Jan Hubicka X-SW-Source: 2002-08/txt/msg00211.txt.bz2 List-Id: The following reply was made to PR target/7559; it has been noted by GNATS. From: Jan Hubicka To: Gwenole Beauchesne Cc: gcc-gnats@gcc.gnu.org, david@mandrakesoft.com, aj@suse.de, jh@suse.cz, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: target/7559: kdelibs miscompilation Date: Sat, 10 Aug 2002 15:14:14 +0200 > 3) The last testcase is ultra-reduced to a two eightbytes object, with > only one member in each one. That one do fails. > > extern void abort(); > > struct A { > long x; > }; > > struct R { > struct A a, b; > }; > > struct R R = { > 100, 200 > }; > > void f(struct R r) { > if (r.a.x != R.a.x || r.b.x != R.b.x) > abort(); > } > > int main() { > f(R); > return 0; > } This looks like a bug in code computing offests of nested aggregates. I am just checking it. Thanks a lot for reducing the testcase! This is really usefull one :) Honza > > 4) The testcase won't fail if we add some garbage in struct R, > because the size of the object will be > 16 bytes, thus having MEMORY > class. > > HTH, > Gwenole.