diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-30 21:40:05 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-30 21:40:05 +0000 |
commit | 6f276b59be80f17532887ef17ef87a49af943de8 (patch) | |
tree | dc99180a6ab62f8c48a800f1fd827a76eb51be98 /gcc/genrecog.c | |
parent | e3c4633e3298e08018346725b1c5a7db42e19eb6 (diff) | |
download | gcc-6f276b59be80f17532887ef17ef87a49af943de8.tar.gz |
* genrecog.c (write_switch): Check for duplicate CODE cases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30276 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r-- | gcc/genrecog.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 5aea00490f0..464c49921a7 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -1695,13 +1695,14 @@ write_switch (start, depth) { char codemap[NUM_RTX_CODE]; struct decision *ret; + RTX_CODE code; memset (codemap, 0, sizeof(codemap)); printf (" switch (GET_CODE (x%d))\n {\n", depth); + code = p->tests->u.code; do { - RTX_CODE code = p->tests->u.code; printf (" case "); print_code (code); printf (":\n goto L%d;\n", p->success.first->number); @@ -1710,7 +1711,10 @@ write_switch (start, depth) codemap[code] = 1; p = p->next; } - while (p && p->tests->type == DT_code && !p->tests->next); + while (p + && ! p->tests->next + && p->tests->type == DT_code + && ! codemap[code = p->tests->u.code]); /* If P is testing a predicate that we know about and we haven't seen any of the codes that are valid for the predicate, we can |