https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71893
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Index: gcc/tree-ssa-sccvn.c =================================================================== *** gcc/tree-ssa-sccvn.c (revision 238370) --- gcc/tree-ssa-sccvn.c (working copy) *************** copy_reference_ops_from_ref (tree ref, v *** 810,815 **** --- 810,818 ---- /* Always record lower bounds and element size. */ temp.op1 = array_ref_low_bound (ref); temp.op2 = array_ref_element_size (ref); + /* array_ref_element_size forces the result to sizetype + even if that is the same as bitsizetype. */ + STRIP_USELESS_TYPE_CONVERSION (temp.op2); if (TREE_CODE (temp.op0) == INTEGER_CST && TREE_CODE (temp.op1) == INTEGER_CST && TREE_CODE (temp.op2) == INTEGER_CST)