summaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-16 13:46:40 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-16 13:46:40 +0000
commit43683684aef9bfa9dbb0a8081c72f7eadd30d09b (patch)
tree98ba76a8b450b4f75de83acd65a7faa01952192b /gcc/reg-stack.c
parente206bafd9af9ab7b49eb5a9e4d4750df2647093c (diff)
downloadgcc-43683684aef9bfa9dbb0a8081c72f7eadd30d09b.tar.gz
Patch to fix x86 gcc.dg/980226-1.c failure report by Manfred Hollstein.
* reg-stack.c (constrain_asm_operands): Set n_alternatives to zero if no operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19236 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index ab3ded66eb4..c781d0d2926 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)