public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] PR 61692 - Fix for inline asm ICE
@ 2014-07-27  9:46 David Wohlferd
  2014-07-28 20:23 ` Jeff Law
  0 siblings, 1 reply; 11+ messages in thread
From: David Wohlferd @ 2014-07-27  9:46 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cfgexpand.c.patch --]
[-- Type: text/x-patch; name="cfgexpand.c.patch", Size: 409 bytes --]

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;

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-12-08 21:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-27  9:46 [Patch] PR 61692 - Fix for inline asm ICE David Wohlferd
2014-07-28 20:23 ` Jeff Law
2014-07-28 22:56   ` David Wohlferd
2014-07-31  4:59     ` Jeff Law
2014-08-01  8:07       ` David Wohlferd
2014-08-01 18:29         ` Jeff Law
2014-09-14  8:13           ` David Wohlferd
2014-09-15 21:51             ` Jeff Law
2014-11-16  5:04               ` David Wohlferd
2014-12-06 12:40                 ` David Wohlferd
2014-12-08 21:59                 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).