diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed25fd38f55..8b962c7a023 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-07-12 Richard Henderson + + * reload.c (push_secondary_reload): Make sure to add the new + reload at the end, after acquiring secondary memory. + 2000-07-12 Kaveh R. Ghazi * cpplex.c (is_macro_disabled): Use CPP_WTRADITIONAL. diff --git a/gcc/reload.c b/gcc/reload.c index 7f5f35577a7..412852ec744 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -524,7 +524,13 @@ push_secondary_reload (in_p, x, opnum, optional, reload_class, reload_mode, if (in_p && icode == CODE_FOR_nothing && SECONDARY_MEMORY_NEEDED (class, reload_class, mode)) - get_secondary_mem (x, reload_mode, opnum, type); + { + get_secondary_mem (x, reload_mode, opnum, type); + + /* We may have just added new reloads. Make sure we add + the new reload at the end. */ + s_reload = n_reloads; + } #endif /* We need to make a new secondary reload for this register class. */