Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Nikita Schmidt <cetus@snowball.ucd.ie>
Subject: gcc -fhandle-exceptions
Date: Tue, 15 Apr 1997 15:51:34 +0100	[thread overview]
Message-ID: <9773af260f118c7fde8b9ddb2194fd34.axp-list@archive.invalid> (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

             reply	other threads:[~1997-04-15 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-15 14:51 Nikita Schmidt [this message]
     [not found] <19970415155134.48642@snowball.ucd.ie>
1997-04-16 20:20 ` gcc -fhandle-exceptions Richard Henderson
read-only archive

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