serious x86 problems on OpenBSD

David Mazieres dm@reeducation-labor.lcs.mit.edu
Sun Jun 21 21:56:00 GMT 1998


For at least the past few weeks, egcs cannot correctly compile even
simple programs for me (I am using i386 and OpenBSD).  For example,
the following program:

struct A {
  ~A () {}
};

void
bad ()
{
  A a;
}

int
main ()
{
  bad ();
}

Generates an immediate core dump.  Compiling with -fno-exceptions
fixes the problem.  The problem appears to be in ___get_eh_context.
Code for bad() gets generated as follows:

_bad__Fv:
        pushl %ebp
        movl %esp,%ebp
        subl $16,%esp
        pushl %ebx
        call ___get_eh_context
        movl %eax,%ecx
        movl (%ecx),%edx
        movl 4(%edx),%eax

The last instruction causes a core dump.

Please let me know if I can provide any more information.  I would
love to get egcs working again.

Thanks,
David



More information about the Gcc-bugs mailing list