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]

3.0.1 EH failure on sparc-sun-solaris2.7



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;
}


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