https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102029
Roger Sayle <roger at nextmovesoftware dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware dot com Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |roger at nextmovesoftware dot com --- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> --- Here's the fix that I'm currently testing... (simplify (convert (lshift:s@0 (convert:s@1 @2) INTEGER_CST@3)) - (if (tree_nop_conversion_p (type, TREE_TYPE (@0)) + (if (INTEGRAL_TYPE_P (type) + && !POINTER_TYPE_P (type) + && tree_nop_conversion_p (type, TREE_TYPE (@0)) && INTEGRAL_TYPE_P (TREE_TYPE (@2)) && TYPE_PRECISION (TREE_TYPE (@2)) <= TYPE_PRECISION (type)) (lshift (convert @2) @3)))