This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] PR 61692 - Fix for inline asm ICE
- From: David Wohlferd <dw at LimeGreenSocks dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 27 Jul 2014 00:26:26 -0700
- Subject: [Patch] PR 61692 - Fix for inline asm ICE
- Authentication-results: sourceware.org; auth=none
I'm not sure which maintainer to cc for inline asm stuff?
I have a release on file with the FSF, but don't have SVN write access.
Problem:
extract_insn() in recog.c will ICE if (noperands > MAX_RECOG_OPERANDS).
Normally this isn't a problem since expand_asm_operands() in cfgexpand.c
catches and reports a proper error for this condition. However,
expand_asm_operands() only checks (ninputs + noutputs) instead of
(ninputs + noutputs + nlabels), so you can get the ICE when using "asm
goto." See the bugzilla entry for sample code.
ChangeLog:
2014-07-27 David Wohlferd <dw@LimeGreenSocks.com>
PR target/61692
* cfgexpand.c (expand_asm_operands): Count all inline asm
parameters.
dw
Index: cfgexpand.c
===================================================================
--- cfgexpand.c (revision 212900)
+++ cfgexpand.c (working copy)
@@ -2554,7 +2554,7 @@
}
ninputs += ninout;
- if (ninputs + noutputs > MAX_RECOG_OPERANDS)
+ if (ninputs + noutputs + nlabels > MAX_RECOG_OPERANDS)
{
error ("more than %d operands in %<asm%>", MAX_RECOG_OPERANDS);
return;