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]

Antwort: Re: exceptions and cross jump optimization




Hi Jeff,

Pre-Release 1.1.1 doesn't have the exception bug caused by cross jump
optimization anymore. Well done . You and the egcs team are doing great work.

The 1.1.1 pre-release didn't cause any trouble to me.  Please include in the
release notes for 1.1.1, that binutils 2.9.1 are required on Linux.

Ciao, Uli Kunitz


Datum:         31.10.98 08:57
An:            Ulrich Kunitz/Eschborn/GEFM/DeuBa
Kopie:         egcs-bugs@cygnus.com



Antwort an:    law@cygnus.com

Betreff:       Re: exceptions and cross jump optimization
Nachrichtentext:




  In message <41256616.005D8273.00@dbogw2-e1.esb.eur.deuba.com>you write:
  > Following programm gives different output if compiled with -O0 or -O1.
  >
  > /* cross jump optimization bug */
  >
  > #include <stdio.h>
  > #include <string.h>
  >
  > class A {
  > public:
  >     virtual void throw_exception();
  >     void xxx(char * sz);
  > };
  >
  > void A::throw_exception() { throw 1; }
  >
  > void A::xxx(char * sz) {
  >     if (strcmp(sz, "xxx") == 0) {
  >         try {
  >             throw_exception();
  >             return;
  >         }
  >         catch (int n) { }
  >     }
  >     else {
  >         throw_exception();
  >         return;
  >     }
  > }
  >
  > int  main(void) {
  >     A a;
  >     int fOk = 1;
  >     try {
  >         a.xxx("xxx");
  >     }
  >     catch (int n) {
  >         fOk = 0;
  >     }
  >     printf(fOk != 0 ? "Ok\n" : "Wrong\n");
  > }
  >
This bug has been fixed for egcs-1.1.1.

jeff





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