This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug in eliminate_regs
- To: egcs-bugs at cygnus dot com
- Subject: bug in eliminate_regs
- From: Ulrich Drepper <drepper at cygnus dot com>
- Date: 06 Nov 1998 10:11:55 -0800
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
The function eliminate_regs in reload1.c is sometimes called without
reload been running. The call in my case happens to come from
dbxout.c:1936. But this leaves the variable `reg_eliminate'
uninitialized.
After adding the following patch things are fine again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: reload1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload1.c,v
retrieving revision 1.94
diff -d -u -p -r1.94 reload1.c
--- reload1.c 1998/11/04 21:24:53 1.94
+++ reload1.c 1998/11/06 18:11:23
@@ -2625,6 +2625,9 @@ eliminate_regs (x, mem_mode, insn)
char *fmt;
int copied = 0;
+ if (reg_eliminate == NULL)
+ init_elim_table ();
+
switch (code)
{
case CONST_INT:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------