This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-971122 bug: incorrect code, object destroyed immdiately


Jeff, this should go into the release.

>>>>> Joseph Heled <pepe@iconz.co.nz> writes:

> egcs generates incorrect code for the simple code below.

> X* f(void) {
>   return  (new X) + 1; 
> }

Thu Nov 27 01:18:36 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* expr.c (preexpand_calls): Don't look past a TRY_CATCH_EXPR.

Index: expr.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/expr.c,v
retrieving revision 1.330
diff -c -r1.330 expr.c
*** expr.c	1997/11/02 05:17:15	1.330
--- expr.c	1997/11/27 09:18:17
***************
*** 10161,10166 ****
--- 10161,10167 ----
      case RTL_EXPR:
      case WITH_CLEANUP_EXPR:
      case CLEANUP_POINT_EXPR:
+     case TRY_CATCH_EXPR:
        return;
  
      case SAVE_EXPR:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]