diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-08-31 14:22:41 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-08-31 14:22:41 -0700 |
commit | f40fac9b075ab3fa18619f9bbc49ea4867460d45 (patch) | |
tree | d058a04fe74cbb8740cf26ee16ffaf5fd2029686 | |
parent | 67d4766b4a562bdf49633d0af7d8659930ce973e (diff) | |
download | gcc-f40fac9b075ab3fa18619f9bbc49ea4867460d45.zip gcc-f40fac9b075ab3fa18619f9bbc49ea4867460d45.tar.gz gcc-f40fac9b075ab3fa18619f9bbc49ea4867460d45.tar.bz2 |
(push_reload): Abort is secondary_reload wants same
class as an input reload.
From-SVN: r5236
-rw-r--r-- | gcc/reload.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index c88d651..f3e8802 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1006,6 +1006,21 @@ push_reload (in, out, inloc, outloc, class, : type == RELOAD_FOR_OUTPUT ? RELOAD_FOR_OUTPUT_ADDRESS : type); + /* This case isn't valid, so fail. Reload is allowed to use the + same register for RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_INPUT + reloads, but in the case of a secondary register, we actually + need two different registers for correct code. We fail here + to prevent the possibility of silently generating incorrect code + later. + + The convention is that secondary input reloads are valid only if + the secondary_class is different from class. If you have such + a case, you can not use secondary reloads, you must work around + the problem some other way. */ + + if (type == RELOAD_FOR_INPUT && secondary_class == class) + abort (); + /* If we need a tertiary reload, see if we have one we can reuse or else make one. */ |