> I suggest to re-instantiate the canonical type checks for the aggregate type > case. OK, thanks, this fixes all the known ICEs so far. Tested on x86_64-suse-linux, OK for the mainline? 2015-11-03 Eric Botcazou * gimple-expr.c (useless_type_conversion_p): Reinstate type canonical check for aggregate types and beef up comment for mode check. 2015-11-03 Eric Botcazou * gnat.dg/discr45.adb: Only compile the test. -- Eric Botcazou