PR debug/79289
* dwarf2out.c (gen_type_die_with_usage): When picking a variant
for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
From-SVN: r245039
+2017-01-30 Ian Lance Taylor <iant@google.com>
+
+ PR debug/79289
+ * dwarf2out.c (gen_type_die_with_usage): When picking a variant
+ for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
+
2017-01-30 Martin Sebor <msebor@redhat.com>
* doc/invoke.texi (-Wformat-truncation=1): Fix typo.
but try to canonicalize. */
tree main = TYPE_MAIN_VARIANT (type);
for (tree t = main; t; t = TYPE_NEXT_VARIANT (t))
- if (check_base_type (t, main) && check_lang_type (t, type))
- type = t;
+ {
+ if (check_base_type (t, main) && check_lang_type (t, type))
+ {
+ type = t;
+ break;
+ }
+ }
}
else if (TREE_CODE (type) != VECTOR_TYPE
&& TREE_CODE (type) != ARRAY_TYPE)