This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/61692] New: ICE in extract_insn in recog.c for asm with many parameters
- From: "gccbugzilla at limegreensocks dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Jul 2014 22:37:12 +0000
- Subject: [Bug inline-asm/61692] New: ICE in extract_insn in recog.c for asm with many parameters
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61692
Bug ID: 61692
Summary: ICE in extract_insn in recog.c for asm with many
parameters
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: inline-asm
Assignee: unassigned at gcc dot gnu.org
Reporter: gccbugzilla at limegreensocks dot com
There is an ICE coming from recog.c in extract_insn. The problem occurs when
you have 30 inputs and 1 goto in an asm instruction. That's 31 operands and
MAX_RECOG_OPERANDS only allows 30.
The problem comes from this line in expand_asm_operands in cfgexpand.c:
if (ninputs + noutputs > MAX_RECOG_OPERANDS)
Changing that to:
if (ninputs + noutputs + nlabels > MAX_RECOG_OPERANDS)
generates the (expected) message:
error: more than 30 operands in 'asm'
You can see the ICE with this code:
int main()
{
loop:
asm goto (""
: /* no outputs */
: "r" (0), "r" (1), "r" (2), "r" (3), "r" (4),
"r" (5), "r" (6), "r" (7), "r" (8), "r" (9),
"r" (10), "r" (11), "r" (12), "r" (13), "r" (14),
"r" (15), "r" (16), "r" (17), "r" (18), "r" (19),
"r" (20), "r" (21), "r" (22), "r" (23), "r" (24),
"r" (25), "r" (26), "r" (27), "r" (28), "r" (29)
: /* no clobbers */
: loop);
}