diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2006-09-19 21:22:31 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2006-09-19 21:22:31 +0000 |
commit | d63e138968dd44f2d1894c12e460816b1d1bdc13 (patch) | |
tree | 919ac27d6e44a731fb1b62bb3a893ed4c0dcd946 /gcc/reload1.c | |
parent | 9f0b9edcd75599436998606e0ceca5cbce69a94d (diff) | |
download | gcc-d63e138968dd44f2d1894c12e460816b1d1bdc13.zip gcc-d63e138968dd44f2d1894c12e460816b1d1bdc13.tar.gz gcc-d63e138968dd44f2d1894c12e460816b1d1bdc13.tar.bz2 |
re PR rtl-optimization/21299 (internal error on invalid asm statement)
PR rtl-optimization/21299
* reload1.c (reload): Purge invalid ASMs in the final pass.
From-SVN: r117061
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 04f6448..58f77cb 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1167,6 +1167,20 @@ reload (rtx first, int global) { rtx *pnote; + /* Clean up invalid ASMs so that they don't confuse later passes. + See PR 21299. */ + if (asm_noperands (PATTERN (insn)) >= 0) + { + extract_insn (insn); + if (!constrain_operands (1)) + { + error_for_asm (insn, + "%<asm%> operand has impossible constraints"); + delete_insn (insn); + continue; + } + } + if (CALL_P (insn)) replace_pseudos_in (& CALL_INSN_FUNCTION_USAGE (insn), VOIDmode, CALL_INSN_FUNCTION_USAGE (insn)); |