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]
Other format: [Raw text]

[Bug c++/13337] New: exceptions don't get caught when thrown on AIX


#include <iostream>
using namespace std;

int main()
{   
 cout << "testing throw catch" << endl;
 try {
   cout<<"in try block" << endl;
   throw new int;
 }
 catch (int * i) {
   cout<<"in catch block\n";
 }
 return 0;
}  


when the example program is compiled, it dies with a stack trace as follows
(shown by dbx):
raise(??) at 0xd01dedf8
abort() at 0xd01ed898
_ZN10__cxxabiv111__terminateEPFvvE(??), line 47 in "eh_terminate.cc"
_ZSt9terminatev(), line 57 in "eh_terminate.cc"
__cxa_throw(??, ??, ??), line 80 in "eh_throw.cc"
main(), line 9 in "exc.cpp"

gcc was configured as "configure --prefix=/usr/tools/upgrade/gnu/gcc/3.3
--with-local-prefix=/usr/tools/upgrade/gnu/gcc/3.3 --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --enable-version-specific-runtime-libs
--enable-languages=c,c++ -v"

on the same platform, a similarly compiled gcc 3.3.1 exhibits the same
behaviour, while gcc-2.95.2 works properly.

-- 
           Summary: exceptions don't get caught when thrown on AIX
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drewelmore at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-ibm-aix5.1.0.0
  GCC host triplet: powerpc-ibm-aix5.1.0.0
GCC target triplet: powerpc-ibm-aix5.1.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13337


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