Sender: farin AT rumms DOT uni-mannheim DOT de Message-ID: <39661E18.33DE8932@ti.uni-mannheim.de> Date: Fri, 07 Jul 2000 20:14:48 +0200 From: Dirk Farin Organization: Dept. Circuitry and Simulation, University Mannheim X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgcc AT delorie DOT com Subject: Bug concerning exception handling + omit frame pointer Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: pgcc AT delorie DOT com Hi, there is a bug in pgcc-2.95.2 19991024 (release) when compiling code that uses exception-handling with optimization levels of 5 and above (see very simple program at the end). I think that this comes from the omit-frame-pointer optimization that is automatically included with -O5. The compiler should at least print an error message or disable "omit-frame-pointer" when it encounters exception handling code. However, with "gcc version egcs-2.91.66", it runs fine even with the option enabled. Greetings, Dirk Farin PS.: Please include my email-address as CC as I'm not on the list. This program segfaults with -O5 and above: #include #include main() { try { throw "FOO"; } catch(const char* txt) { cout << txt << endl; } }