aboutsummaryrefslogtreecommitdiff
path: root/gcc/gensupport.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.com>2015-12-15 14:34:01 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2015-12-15 14:34:01 +0000
commitb7e2dd6fb446b6b55358f1a6ec7abcf7d28b5590 (patch)
tree039e08be1db54fca47cbe2d488e1bc1566b8e8c3 /gcc/gensupport.c
parent72030b28a1bf6cdd3f3aa204f2909bce5d8c6dce (diff)
downloadgcc-b7e2dd6fb446b6b55358f1a6ec7abcf7d28b5590.zip
gcc-b7e2dd6fb446b6b55358f1a6ec7abcf7d28b5590.tar.gz
gcc-b7e2dd6fb446b6b55358f1a6ec7abcf7d28b5590.tar.bz2
re PR middle-end/21273 (gensupport.c:collect_insn_data doesn't consider the constraints of match_scratch)
Fix PR21273 PR middle-end/21273 * gensupport.c (collect_insn_data): Look for number of alternatives in MATCH_SCRATCH. From-SVN: r231654
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r--gcc/gensupport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 7969060..e32f199 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1068,12 +1068,12 @@ collect_insn_data (rtx pattern, int *palt, int *pmax)
switch (code)
{
case MATCH_OPERAND:
- i = n_alternatives (XSTR (pattern, 2));
+ case MATCH_SCRATCH:
+ i = n_alternatives (XSTR (pattern, code == MATCH_SCRATCH ? 1 : 2));
*palt = (i > *palt ? i : *palt);
/* Fall through. */
case MATCH_OPERATOR:
- case MATCH_SCRATCH:
case MATCH_PARALLEL:
i = XINT (pattern, 0);
if (i > *pmax)