diff options
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index ab3ded6..c781d0d 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -637,9 +637,14 @@ constrain_asm_operands (n_operands, operands, operand_constraints, already guaranteed that all operands have the same number of alternatives. */ - n_alternatives = 1; - for (q = constraints[0]; *q; q++) - n_alternatives += (*q == ','); + if (n_operands == 0) + n_alternatives = 0; + else + { + n_alternatives = 1; + for (q = constraints[0]; *q; q++) + n_alternatives += (*q == ','); + } this_alternative = 0; while (this_alternative < n_alternatives) |