This is the mail archive of the gcc@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]

GCC 4.2.2 arm-linux-gnueabi: c++ exceptions handling?


Hello all,

I've built the above cross-compiler and ran the GCC testsuite.
Noted a lot of c++ tests failed with the same output:
...
terminate called after throwing an instance of 'int'
terminate called recursively
Aborted
...

Compiler details:
Reading specs from /opt/eldk-4.2-arm-2008-09-24/usr/bin/../lib/gcc/arm-linux-gnueabi/4.2.2/specs
Target: arm-linux-gnueabi
Configured with: /work/psl/eldk-builds/arm-2008-09-24/work/usr/src/denx/BUILD/crosstool-0.43/build/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/gcc-4.2.2/configure --target=arm-linux-gnueabi --host=i686-host_pc-linux-gnu --prefix=/var/tmp/eldk.Jb5047/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi --disable-hosted-libstdcxx --with-headers=/var/tmp/eldk.Jb5047/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/arm-linux-gnueabi/include --with-local-prefix=/var/tmp/eldk.Jb5047/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/arm-linux-gnueabi --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++,java --enable-shared --enable-c99 --enable-long-long --without-x
Thread model: posix
gcc version 4.2.2



However, testing results in http://gcc.gnu.org/ml/gcc-testresults/2007-09/msg00570.html
states that this should work.


I even downloaded and built the exact pre-release version
used in the above tests and tried it - all the same.

I wonder could it be the kernel or Glibc/binutils issue?
I'm running 2.6.21.5, Glibc is 2.6 (Fedora Core 7 release),
binutils is 2.17.50.0.12.

Could someone having the 4.2 release series compiler configured for
ARM EABI target try this simple test:
----
extern "C" void abort(void);

#define CI(stmt) try { stmt; abort(); } catch (int) { }

struct has_destructor
{
    ~has_destructor() { }
};

struct no_destructor
{
};

int PI(int& i) { return i++; }

int main(int argc, char *argv[])
{
    (argc+1 ? has_destructor() : throw 0);
    CI((argc+1 ? throw 0 : has_destructor()));
}
----
Build as arm-linux-gnueabi-g++ -o cond1 cond1.C


Thanks for any feedback, Sergei


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