www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/2000/07/07/14:21:52

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 <farin AT ti DOT uni-mannheim DOT de>
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
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 <iostream.h>
#include <iomanip.h>

main()
{
  try
    {
      throw "FOO";
    }
  catch(const char* txt)
    {
      cout << txt << endl;
    }
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019