aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-rtl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/read-rtl.cc')
-rw-r--r--gcc/read-rtl.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/read-rtl.cc b/gcc/read-rtl.cc
index f3b5613..00bf4ab 100644
--- a/gcc/read-rtl.cc
+++ b/gcc/read-rtl.cc
@@ -1293,8 +1293,25 @@ md_reader::read_mapping (struct iterator_group *group, htab_t table)
string = read_string (false);
require_char_ws (')');
}
- number = group->find_builtin (name.string);
- end_ptr = add_map_value (end_ptr, number, string);
+ auto *subm = (struct mapping *) htab_find (group->iterators,
+ &name.string);
+ if (subm)
+ {
+ if (m == subm)
+ fatal_with_file_and_line ("recursive definition of `%s'",
+ name.string);
+ for (map_value *v = subm->values; v; v = v->next)
+ {
+ auto *joined = rtx_reader_ptr->join_c_conditions (v->string,
+ string);
+ end_ptr = add_map_value (end_ptr, v->number, joined);
+ }
+ }
+ else
+ {
+ number = group->find_builtin (name.string);
+ end_ptr = add_map_value (end_ptr, number, string);
+ }
c = read_skip_spaces ();
}
while (c != ']');