From dg-rtp!uunet!tut.cis.ohio-state.edu!gzilla.eng.sun.com!tiemann Mon Jun  4 13:53:30 EDT 1990
Article 1948 of gnu.g++.bug:
Path: dg-rtp!uunet!tut.cis.ohio-state.edu!gzilla.eng.sun.com!tiemann
>From: tiemann@gzilla.eng.sun.com (Michael Tiemann)
Newsgroups: gnu.g++.bug
Subject: bug in g++-1.37.1 on Sun 3
Message-ID: <9006030449.AA05620@gzilla.Eng.Sun.COM>
Date: 3 Jun 90 04:49:18 GMT
References: <9005240325.AA27161@eos.EE.CORNELL.EDU>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@cygnus.com
Distribution: gnu
Organization: Cygnus Support (+1 415 322 3811)
Lines: 38


    Vital Stats:
    g++ version - 1.37.1
    hardware - Sun 3
    OS - Sun OS 4.0.3

    Bug Description - The problem is with the destruction of an array of
    objects.  G++ attempts to create a loop that invokes the destructor
    for each object in the array.  The problem is that, in some cases, g++
    does not produce correct assembly code for this purpose.

This bug is fixed with the following diff:

gzilla% diff -c2 expr.c~ expr.c
*** expr.c~	Sun May 13 20:09:04 1990
--- expr.c	Sat Jun  2 21:47:12 1990
***************
*** 2383,2390 ****
  	  {
  	    if (DECL_RTL (vars) == 0)
! 	      {
! 		expand_decl (vars);
! 		expand_decl_init (vars);
! 	      }
  	    vars = TREE_CHAIN (vars);
  	  }
--- 2383,2390 ----
  	  {
  	    if (DECL_RTL (vars) == 0)
! 	      expand_decl (vars);
! 	    /* Have to initialize these vars whereever this LET_STMT
! 	       is expanded.  */
! 	    expand_decl_init (vars);
  	    vars = TREE_CHAIN (vars);
  	  }
gzilla% 

Michael


