http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47167
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 16:13:31 UTC --- Can you check if the following patch solves your problem? Index: tree-ssa-copyrename.c =================================================================== --- tree-ssa-copyrename.c (revision 168987) +++ tree-ssa-copyrename.c (working copy) @@ -226,8 +226,11 @@ copy_rename_partition_coalesce (var_map ign2 = false; } - /* Don't coalesce if the two variables are not of the same type. */ - if (TREE_TYPE (root1) != TREE_TYPE (root2)) + /* Don't coalesce if the two variables are not compatible . */ + if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2)) + || ((TREE_CODE (TREE_TYPE (root1)) == ENUMERAL_TYPE + || TREE_CODE (TREE_TYPE (root2)) == ENUMERAL_TYPE) + && TREE_TYPE (root1) != TREE_TYPE (root2))) { if (debug) fprintf (debug, " : Different types. No coalesce.\n"); The differences in GIMPLE of the patch do not explain the code-differences though, so it might be just bad luck that the patch regressed things for you. I can see other unwanted differences though.