This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
3.0.1 EH failure on sparc-sun-solaris2.7
- To: gcc-bugs at gcc dot gnu dot org
- Subject: 3.0.1 EH failure on sparc-sun-solaris2.7
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Fri, 10 Aug 2001 18:33:09 -0400 (EDT)
The program below dumps core on SPARC when compiled at -O2. The
cleanup code expects register %i1 to be preserved, however it is not,
suggesting the fault lies with the EH runtime. (In fact I first observed
a similar failure in a Java program.)
Since this apparently isn't a code generation but I don't know how to fix
it. A quick search didn't find a similar PR, though I'm not certain which
category to use. It is a regression from 2.95.2.
Unfortunately this causes 3.0.1 to be useless to me on SPARC :(
#include <cstdio>
struct silly {
int val;
silly (int n) { val = n; fprintf (stderr, "enter: %d\n", val); }
~silly () { fprintf (stderr, "leave: %d\n", val); }
};
int main (int argc, char **) {
try {
silly s (argc);
throw 1;
} catch (int n) {}
return 0;
}