From patchwork Mon Dec 12 01:11:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 87621 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1406412qgi; Sun, 11 Dec 2016 17:12:29 -0800 (PST) X-Received: by 10.99.117.71 with SMTP id f7mr163625785pgn.126.1481505149015; Sun, 11 Dec 2016 17:12:29 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 89si41642215pfl.229.2016.12.11.17.12.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Dec 2016 17:12:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444117-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444117-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444117-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ll/uH1FYJqcoSQjCojNnxy5XA9SBj++FRTlXZwbLFQTufUfJku rRrm5mYJvPN+3gi6A4oTZ8+so+iea9BDDXQRuzDO9gfzeDMLCNv8XFJwTmU6ctcx 0u43xlBWEa1a/DFeYvWxG+kaVrQZut1EvZ7wksZ1NyRDdFdXyTZ3k1ruI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=B36Dcxg7mBrT8zGsiHw8NXtJ7ms=; b=Nz8IPOvNcmikoeBgCilU umsG+tEf5ScvYkTIxSkRVyABMnx7tAJJ0wul0/zrXMln6f1vapFLW6fGGjHOZ5Ai tLZkoSbv0EaRFa8dRC7JMM8jbosFHlXVkl2Jg+qHMfhXeboA6WqxXYqJtd8hnM02 CY+qa6HgUoqckajsEdAxO34= Received: (qmail 21781 invoked by alias); 12 Dec 2016 01:12:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21767 invoked by uid 89); 12 Dec 2016 01:12:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_05, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=sk:sandra, loosemore, sandra@codesourcery.com, sandracodesourcerycom X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Dec 2016 01:12:02 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cGF9r-0000kN-7n from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Sun, 11 Dec 2016 17:11:59 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 11 Dec 2016 17:11:56 -0800 To: "gcc-patches@gcc.gnu.org" CC: Chung-Lin Tang From: Sandra Loosemore Subject: [nios2, committed] fix structure sharing ICE Message-ID: <584DF95B.7060107@codesourcery.com> Date: Sun, 11 Dec 2016 18:11:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Since the last time I built GCC for nios2-linux-gnu target, it had started dying while building libgcc, with an ICE complaining about shared rtx structure in a CONST expression involving UNSPEC_PIC_CALL_SYM. I tracked it down to failing to copy the source rtx for one of the pieces of a hi/lo register load pair. Fixed thusly. -Sandra Index: gcc/config/nios2/nios2.c =================================================================== --- gcc/config/nios2/nios2.c (revision 243520) +++ gcc/config/nios2/nios2.c (working copy) @@ -2334,7 +2334,8 @@ nios2_emit_move_sequence (rtx *operands, from = nios2_legitimize_constant_address (from); if (CONSTANT_P (from)) { - emit_insn (gen_rtx_SET (to, gen_rtx_HIGH (Pmode, from))); + emit_insn (gen_rtx_SET (to, + gen_rtx_HIGH (Pmode, copy_rtx (from)))); emit_insn (gen_rtx_SET (to, gen_rtx_LO_SUM (Pmode, to, from))); set_unique_reg_note (get_last_insn (), REG_EQUAL, copy_rtx (operands[1]));