From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::HELP-G++-REQUEST"  5-APR-1991 04:17:36.10
To:	ARISIA::EVERHART
CC:	
Subj:	Re: Has the g++ 1.39 destructors bug been fixed?

From:	help-g++-request@prep.ai.mit.edu@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.93)
	 id AA07107; Fri, 5 Apr 91 03:21:27 EST
Received: by life.ai.mit.edu (4.1/AI-4.10) id AA08938; Fri, 5 Apr 91 01:21:40 EST
Return-Path: <help-g++-request@prep.ai.mit.edu>
Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA08922; Fri, 5 Apr 91 01:20:07 EST
Received: by tut.cis.ohio-state.edu (5.61-kk/5.910403)
	id AA15702; Fri, 5 Apr 91 01:15:47 -0500
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for help-g++@prep.ai.mit.edu (help-g++@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 3 Apr 91 17:58:29 GMT
From: pdn!tscs!tct!chip@uunet.uu.net  (Chip Salzenberg)
Organization: Teltronics/TCT, Sarasota, FL
Subject: Re: Has the g++ 1.39 destructors bug been fixed?
Message-Id: <27FA17C6.4FF6@tct.com>
References: <22805@know.pws.bull.com>, <378@serval.ukc.ac.uk>
Sender: help-g++-request@prep.ai.mit.edu
To: help-g++@prep.ai.mit.edu

According to iau@ukc.ac.uk (I.A.Utting):
>I had to decommission g++ 1.39 on Sparcs here because of the problem
>with destructors not being called on "return" from routines[1], but now
>this bug has disappeared from Loic Dachary's list without me noticing
>any apparent fix being posted, or any new versions being placed on the
>usual servers!

Loic couldn't reproduce it.  Why?  Beats me!  But it's real, and
here's a patch to eliminate it:

Index: stmt.c
***************
*** 1730,1733 ****
--- 1730,1738 ----
    while (block && block->data.block.cleanups == 0)
      block = block->next;
+ 
+   /* Only use `last_insn' if there are cleanups which must be run.  */
+ 
+   if (block || cleanup_label != 0)
+     last_insn = get_last_insn ();
  
    /* If yes, use a goto to return, since that runs cleanups.  */

-- 
Chip Salzenberg                    <chip@tct.com>, <uunet!pdn!tct!chip>
  Brand X Industries Custodial, Refurbishing and Containment Service
            When You Never, Ever Want To See It Again [tm]
