From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5239 invoked by alias); 8 Dec 2001 17:12:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 5067 invoked from network); 8 Dec 2001 17:10:59 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sources.redhat.com with SMTP; 8 Dec 2001 17:10:59 -0000 Received: from hiauly1.hia.nrc.ca (localhost [127.0.0.1]) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id fB8HAw7c012116; Sat, 8 Dec 2001 12:10:58 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) id fB8HAvlU012115; Sat, 8 Dec 2001 12:10:57 -0500 (EST) Message-Id: <200112081710.fB8HAvlU012115@hiauly1.hia.nrc.ca> Subject: Re: C++ pcc struct return fix To: jason@redhat.com (Jason Merrill) Date: Sat, 08 Dec 2001 09:12:00 -0000 From: "John David Anglin" Cc: mark@codesourcery.com, gcc-patches@gcc.gnu.org In-Reply-To: from "Jason Merrill" at Dec 8, 2001 11:00:56 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00952.txt.bz2 > >>>>> "John" == John David Anglin writes: > > >> Did we ever reach resolution on this issue? > > No. The only issue remaining in this thread is the testcase. Is this OK for the main? There is no change in the test from what I sent previously. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2001-12-08 John David Anglin * g++.dg/init/struct-ret1.C: New file. --- /dev/null Sat Dec 8 11:40:02 2001 +++ g++.dg/init/struct-ret1.C Tue Dec 4 14:15:38 2001 @@ -0,0 +1,19 @@ +// { dg-do run } + +struct blah { int a[6]; }; + +inline struct blah foo() +{ + struct blah r = { { 12, 24, 36, 48, 60, 72 } }; + return r; +} + +int +main() +{ + struct blah x = foo(); + + if (x.a[0] != 12 || x.a[1] != 24 || x.a[2] != 36 || x.a[3] != 48 + || x.a[4] != 60 || x.a[5] != 72) + return 1; +}