aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-12-30 07:29:06 +0000
committerRichard Stallman <rms@gnu.org>1992-12-30 07:29:06 +0000
commit79a365a71e7f8614265378acf7b7f7b364834724 (patch)
tree405aeb7da83a696da66f78ed27a77211be94b68f /gcc
parent5488078fdc7570059875dda453fae8da8c802aa7 (diff)
downloadgcc-79a365a71e7f8614265378acf7b7f7b364834724.zip
gcc-79a365a71e7f8614265378acf7b7f7b364834724.tar.gz
gcc-79a365a71e7f8614265378acf7b7f7b364834724.tar.bz2
(emit_reload_insns): Error instead of abort
if an asm has a VOIDmode output operand. From-SVN: r2990
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 75738ef..6d66504 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -5339,7 +5339,16 @@ emit_reload_insns (insn)
mode = GET_MODE (old);
if (mode == VOIDmode)
- abort (); /* Should never happen for an output. */
+ {
+ /* VOIDmode should never happen for an output. */
+ if (asm_noperands (PATTERN (insn)) < 0)
+ /* It's the compiler's fault. */
+ abort ();
+ error_for_asm (insn, "output operand is constant in `asm'");
+ /* Prevent crash--use something we know is valid. */
+ mode = word_mode;
+ old = gen_rtx (REG, mode, REGNO (reloadreg));
+ }
/* A strict-low-part output operand needs to be reloaded
in the mode of the entire value. */