From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 345303857C63 for ; Fri, 9 Oct 2020 10:26:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 345303857C63 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0B950AE3B; Fri, 9 Oct 2020 10:26:44 +0000 (UTC) From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] IPA modref: fix miscompilation in clone when IPA modref is used To: gcc-patches@gcc.gnu.org Cc: Jan Hubicka Message-ID: <1a3d5425-792f-9d19-268b-4f643c8d7b86@suse.cz> Date: Fri, 9 Oct 2020 12:26:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 10:26:46 -0000 Hello. There's a tested Honza's patch for the 2 PRs related to SPEC benchmarks. Patch can bootstrap on x86_64-linux-gnu and survives regression tests with one exception: FAIL: gcc.dg/lto/modref-1 c_lto_modref-1_0.o-c_lto_modref-1_1.o execute -O2 -flto-partition=max -flto It's a run-time test that tests: if (!__builtin_constant_p (z)) __builtin_abort (); I guess Honza can incrementally fix the test? I'm going to install the patch. Thanks, Martin gcc/ChangeLog: PR ipa/97292 PR ipa/97335 * ipa-modref-tree.h (copy_from): Drop summary in a clone. --- gcc/ipa-modref-tree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ipa-modref-tree.h b/gcc/ipa-modref-tree.h index b37280d18c7..8d7f2864793 100644 --- a/gcc/ipa-modref-tree.h +++ b/gcc/ipa-modref-tree.h @@ -496,7 +496,8 @@ struct GTY((user)) modref_tree /* Copy OTHER to THIS. */ void copy_from (modref_tree *other) { - merge (other, NULL); + auto_vec parm_map; + merge (other, &parm_map); } /* Search BASE in tree; return NULL if failed. */ -- 2.28.0