From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1450 invoked by alias); 3 Dec 2001 16:40:13 -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 1410 invoked from network); 3 Dec 2001 16:40:11 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sources.redhat.com with SMTP; 3 Dec 2001 16:40:11 -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 fB3Ge97c027656; Mon, 3 Dec 2001 11:40:09 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) id fB3Ge8YS027655; Mon, 3 Dec 2001 11:40:08 -0500 (EST) Message-Id: <200112031640.fB3Ge8YS027655@hiauly1.hia.nrc.ca> Subject: Re: C++ pcc struct return fix To: jason@redhat.com (Jason Merrill) Date: Mon, 03 Dec 2001 08:40:00 -0000 From: "John David Anglin" Cc: gcc-patches@gcc.gnu.org, mark@codesourcery.com In-Reply-To: from "Jason Merrill" at Dec 3, 2001 10:49:24 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/msg00170.txt.bz2 > >>>>> "John" == John David Anglin writes: > > > * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in > > call to build_aggr_init. > > DIRECT_BIND is for binding temporaries to reference variables; I'm not sure > why this would have any effect on your problem. Perhaps rather than call > build_aggr_init here, we should be doing an explicit constructor call as in > ocp_convert. It is a while since I looked at this problem but roughly what happens is that build_aggr_init calls ocp_convert which calls simplify_aggr_init_exprs_r which calls build_aggr_init which calls ... Look at expand_default_init. I think this is why DIRECT_BIND has an affect. I do know that the code generated for function returning a struct seemed reasonable when DIRECT_BIND was added to the flags in the call. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605)