aboutsummaryrefslogtreecommitdiff
path: root/gcc/genrecog.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2004-08-13 06:36:21 +0000
committerZack Weinberg <zack@codesourcery.com>2004-08-13 06:36:21 +0000
commit9024c3097879c7a0c1079505054a621478fa4736 (patch)
tree6bcc0c4a0000dbc6ed0bd19b245971600293fbae /gcc/genrecog.c
parent4dd00e35aa30c373212f1040ed94caada89cf165 (diff)
* genrecog.c (add_to_sequence): When processing a MATCH_PARALLEL,
if pred->singleton != PARALLEL, issue a warning and pretend it was. Also issue a warning for any predicate we don't know about. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@85933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r--gcc/genrecog.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index f3c052c4fbe..c1d559ffe74 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -974,8 +974,18 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position,
{
test->u.pred.data = pred;
allows_const_int = pred->codes[CONST_INT];
- code = pred->singleton;
+ if (was_code == MATCH_PARALLEL
+ && pred->singleton != PARALLEL)
+ message_with_line (pattern_lineno,
+ "predicate '%s' used in match_parallel "
+ "does not allow only PARALLEL", pred->name);
+ else
+ code = pred->singleton;
}
+ else
+ message_with_line (pattern_lineno,
+ "warning: unknown predicate '%s' in '%s' expression",
+ pred_name, GET_RTX_NAME (was_code));
}
/* Can't enforce a mode if we allow const_int. */