From: Martin Liska Date: Thu, 13 Aug 2020 11:05:12 +0000 (+0200) Subject: Add missing vn_reference_t::punned initialization X-Git-Tag: releases/gcc-10.3.0~968 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c863dec102e0a636b99100639f523d084aafce4e;p=thirdparty%2Fgcc.git Add missing vn_reference_t::punned initialization gcc/ChangeLog: PR tree-optimization/96597 * tree-ssa-sccvn.c (vn_reference_lookup_call): Add missing initialization of ::punned. (vn_reference_insert): Use consistently false instead of 0. (vn_reference_insert_pieces): Likewise. (cherry picked from commit adc646b10c7168c3c95373ee9321e3760fc4c5f1) --- diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 78c3a0189a3d..97fe9a687393 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -3567,6 +3567,7 @@ vn_reference_lookup_call (gcall *call, vn_reference_t *vnresult, vr->vuse = vuse ? SSA_VAL (vuse) : NULL_TREE; vr->operands = valueize_shared_reference_ops_from_call (call); vr->type = gimple_expr_type (call); + vr->punned = false; vr->set = 0; vr->base_set = 0; vr->hashcode = vn_reference_compute_hash (vr); @@ -3590,7 +3591,7 @@ vn_reference_insert (tree op, tree result, tree vuse, tree vdef) vr1->vuse = vuse_ssa_val (vuse); vr1->operands = valueize_shared_reference_ops_from_ref (op, &tem).copy (); vr1->type = TREE_TYPE (op); - vr1->punned = 0; + vr1->punned = false; ao_ref op_ref; ao_ref_init (&op_ref, op); vr1->set = ao_ref_alias_set (&op_ref); @@ -3650,7 +3651,7 @@ vn_reference_insert_pieces (tree vuse, alias_set_type set, vr1->vuse = vuse_ssa_val (vuse); vr1->operands = valueize_refs (operands); vr1->type = type; - vr1->punned = 0; + vr1->punned = false; vr1->set = set; vr1->base_set = base_set; vr1->hashcode = vn_reference_compute_hash (vr1);