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]

Exception bug in egcs-19980803 on linux


This code is from the blitz compiler testsuite, slightly modified.  It
works under egcs-1.0.1, but the code generated core dumps with egcs-19980803.
Here's the code:
// Exceptions
// BZ_EXCEPTIONS

#include <typeinfo>
#include <iostream>

class foo { };

int divide(int a, int b)
{
    if (b == 0)
        throw foo();

    return a / b;
}

int main()
{
    try {
        divide(5,0);
    }
    catch(foo x) {
      cout << "division by zero error" << endl;
      exit(1);
    }

    cout << "Division worked!" << endl;
}


Here's the output from the compile command
eg++-latest -v -o except except.cc
Reading specs from /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/specs
gcc version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental)
 /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ except.cc /tmp/ccIsZR2H.ii
GNU CPP version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /ufs/murphy/derrick/gnu/egcs-19980803/include/g++
 /usr/local/include
 /ufs/murphy/derrick/gnu/egcs-19980803/i686-pc-linux-gnulibc1/include
 /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/include
 /usr/include
End of search list.
 /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/cc1plus /tmp/ccIsZR2H.ii -quiet -dumpbase except.cc -version -o /tmp/ccS4eN7z.s
GNU C++ version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental) (i686-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental).
 as -V -Qy -o /tmp/cctDkUs8.o /tmp/ccS4eN7z.s
GNU assembler version 960425 (i486-linux), using BFD version 2.6.0.14
 /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -o except /usr/lib/crt1.o /usr/lib/crti.o /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/crtbegin.o -L/ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53 -L/ufs/murphy/derrick/gnu/egcs-19980803/i686-pc-linux-gnulibc1/lib -L/ufs/murphy/derrick/gnu/egcs-19980803/lib /tmp/cctDkUs8.o -lstdc++ -lm -lgcc -lc -lgcc /ufs/murphy/derrick/gnu/egcs-19980803/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.53/crtend.o /usr/lib/crtn.o

-- Derrick Bass


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