When you have lots of operands and lots of alternatives in a pattern, it is often not immediately apparent if the problem is in the indicated alternative or in the one that genoutput uses as a reference for the 'correct' number of alternatives, and/or if you dropped a comma or had one too many. By making genoutput tell you what the argument counts are, this gets a little bit easier.
Bootstrapped on x86_64-pc-linux-gnu.
2021-01-13 Joern Rennecke <joern.renne...@embecosm.com> Make "wrong number of alternatives" message a bit more specific. diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 8e911cce2f5..d2836f85bbf 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -813,8 +813,8 @@ validate_insn_alternatives (class data *d) if (n == 0) n = d->operand[start].n_alternatives; else if (n != d->operand[start].n_alternatives) - error_at (d->loc, "wrong number of alternatives in operand %d", - start); + error_at (d->loc, "wrong number of alternatives in operand %d, %d, expected %d", + start, d->operand[start].n_alternatives, n); } }