summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-22 02:46:22 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-22 02:46:22 +0000
commitcc9c157e2b011bbfc3e2d5063fc953cb550811c8 (patch)
treee2c92b37d6b92aab74b78a8763948c6cf25a680a /gcc
parentacd39194c7dfaf3f3a1906595c519215062d615e (diff)
downloadgcc-cc9c157e2b011bbfc3e2d5063fc953cb550811c8.tar.gz
* reload1.c (eliminate_regs): Do not lose if eliminate_regs is called
without reload having been called earlier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/reload1.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5f2ef26212b..3d51ad02087 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Sat Nov 21 22:12:09 1998 Jeffrey A Law (law@cygnus.com)
+ * reload1.c (eliminate_regs): Do not lose if eliminate_regs is called
+ without reload having been called earlier.
+
* v850.c (ep_memory_operand): Offsets < 0 are not valid for EP
addressing modes.
(v850_reorg): Similarly.
diff --git a/gcc/reload1.c b/gcc/reload1.c
index c6f81fae8f6..5610b22dfe6 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2646,6 +2646,12 @@ eliminate_regs (x, mem_mode, insn)
char *fmt;
int copied = 0;
+ /* We can reach here without reload being run if we have an variable
+ definition in a file with no functions (for exmaple). Ensure we
+ have a valid elimination table in such cases. */
+ if (reg_eliminate == NULL)
+ init_elim_table ();
+
switch (code)
{
case CONST_INT: