We have a copy_type function in gigi and the more stringent type checking
added by Jan revealed that we should also set TYPE_CANONICAL along with
TYPE_MAIN_VARIANT there.
Tested on x86_64-suse-linux, applied on the mainline.
2015-06-03 Eric Botcazou <ebotca...@adacore.com>
* gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
--
Eric Botcazou
Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c (revision 224054)
+++ gcc-interface/utils.c (working copy)
@@ -2191,6 +2191,7 @@ copy_type (tree type)
TYPE_REFERENCE_TO (new_type) = 0;
TYPE_MAIN_VARIANT (new_type) = new_type;
TYPE_NEXT_VARIANT (new_type) = 0;
+ TYPE_CANONICAL (new_type) = new_type;
return new_type;
}