diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 679296ffcaca..18745fb6a157 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Richard Biener + + PR tree-optimization/94163 + * tree-ssa-pre.c (create_expression_by_pieces): Check + whether alignment would be zero. + 2020-03-13 Martin Liska PR lto/94157 diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 29987d840fdb..0c1654f35809 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2815,7 +2815,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr, unsigned HOST_WIDE_INT hmisalign = args.length () == 3 ? tree_to_uhwi (args[2]) : 0; if ((halign & (halign - 1)) == 0 - && (hmisalign & ~(halign - 1)) == 0) + && (hmisalign & ~(halign - 1)) == 0 + && (unsigned int)halign != 0) set_ptr_info_alignment (get_ptr_info (forcedname), halign, hmisalign); }