Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gcc -fhandle-exceptions
@ 1997-04-15 14:51 Nikita Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Nikita Schmidt @ 1997-04-15 14:51 UTC (permalink / raw)


Hello there,

Has anybody experienced problems using gcc-2.7.2.2 with
-fhandle-exceptions flag (e.g., when compiling libg++)?

The problem arises when alpha_return_addr_rtx() is called while the
current sequence of insns is empty.  Although the fix seems to be
straightforward (see the patch below) - if the sequence is empty, r26
cannot be set in it, so we just have to test its emptiness before trying
to call reg_set_between_p, - the problem may actually hide somewhere
before, and, possibly, the actual sequence of insns must never be empty
at that point.  RedHat's gcc somehow manages to avoid segfaulting in
alpha_return_addr_rtx.

I use gcc-2.7.2.2 with a decent set of patches applied (rth-*, pg.patch,
linux.diff, make.patch and some hunks from glibc.diffs).

Does anybody know what is actually wrong with gcc and whether the fix below
is correct?

	Kit

--- config/alpha/alpha.c.orig	Sat Apr  5 19:47:42 1997
+++ config/alpha/alpha.c	Sat Apr  5 20:00:50 1997
@@ -1011,9 +1011,10 @@
   /* We don't know how to back up arbitrary frames.  */
   assert (count == 0);
 
-  if (reg_set_between_p(r26, first_insn, last_insn)
-      /* between is unfortunately not inclusive */
-      || reg_set_p(r26, last_insn))
+  if (first_insn
+      && (reg_set_between_p(r26, first_insn, last_insn)
+          /* between is unfortunately not inclusive */
+          || reg_set_p(r26, last_insn)))
     {
       /* Bits higher up hardcode to the hard frame pointer, so be prepared.  */
       alpha_frame_pointer_required = 1;

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-04-16 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <19970415155134.48642@snowball.ucd.ie>
1997-04-16 20:20 ` gcc -fhandle-exceptions Richard Henderson
1997-04-15 14:51 Nikita Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox