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]

Problem exceptions/threads on HP-10.20 - core dumps


Hi!

The following program core-dumps in the trow() statement.

#include <iostream>

class IOError {};
 

int
main()
{
   try {
      throw IOError();
   }
   catch (IOError &ex) {
      cout << "Caught IOError" << endl;
   }
   catch (...) {
      cout << "Caught all" << endl;
   }

}
 

I have installed  egcs-19980803 with binutils-2.9.1 and enable-haifa.
btw: I need to link in the threads libraries to compile:
g++ -fexeptions -threads test.cc
 
 
 

btw:
I needed to add the -D_CMA_NOWRAPPERS_ to the *cpp entry of my specs file because HP's dce-threads
defines close() as cma_close() and this breaks fstreambase::close().

*cpp:
%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 -D_PA_RISC1_1}}}  %{!ansi: -D_HPUX_SOURCE -D_HIUX_S\
OURCE} %{threads:-D_REENTRANT -D_DCE_THREADS -D_CMA_NOWRAPPERS_}
*lib:
%{!shared:     %{!p:       %{!pg:         %{!threads:-lc}         %{threads:-lcma -lc_r}}       %{p: -L/lib/l\
ibp/ -lc}       %{pg: -L/lib/libp/ -lc}}}


-- 
-------------------------------------------------------
Bjorn Wennberg              email: bjornw@fairplay.no 
                               ms: +47 950 82 657
Senior Programmer           phone: +47 22405538
FairPlay International AS     fax: +47 22405539
 
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]