diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-04-16 13:46:40 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-04-16 06:46:40 -0700 |
commit | 7ce55772e8e2e58230198dbb79466de7c52ac5fd (patch) | |
tree | 98ba76a8b450b4f75de83acd65a7faa01952192b | |
parent | e88caebd288e76f92169b9abe359578757a40d7c (diff) | |
download | gcc-7ce55772e8e2e58230198dbb79466de7c52ac5fd.zip gcc-7ce55772e8e2e58230198dbb79466de7c52ac5fd.tar.gz gcc-7ce55772e8e2e58230198dbb79466de7c52ac5fd.tar.bz2 |
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.
From-SVN: r19236
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reg-stack.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9de0f9..d4ef09c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Apr 16 13:45:51 1998 Jim Wilson <wilson@cygnus.com> + + * reg-stack.c (constrain_asm_operands): Set n_alternatives to zero if + no operands. + Wed Apr 15 11:33:09 1998 Alexandre Petit-Bianco <apbianco@sendai.cygnus.com> * tree.c (build_expr_wfl): Use NULL_TREE if the file name is NULL. 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) |