From patchwork Thu Jan 11 15:29:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 859182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-470842-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="RNF0uEAT"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHVDL5CQVz9sNV for ; Fri, 12 Jan 2018 02:29:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=pMRnoaC8pIvi/h4Zw4XQ2ZmDQMmltrYEq0E2bHv+cU45gu feK9jteCYtpm7ZIPoEfx+5GDNZc7OXTTZJecNGl29vaYBhDicshklW1yhK9SZ+gH npHR/QI06ihfdhiR49y66aBl59oXOhqFB7xkJXWAu7ilXSDp2tvlsokb4Ygic= 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 :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=CmvFyS90TmnHoSkpqAfZ5SaeKPA=; b=RNF0uEAT6kqwmjttW/tb ++CQeaSPSlQmIVkQB3tNenT31UsWxlEnfWHXHcqTiRbrMFuX9wR4aDD0jZ2x+ENu +oo2zy56Ij7IhWeKF33x75wbGs1f5OZRMpzYcWfH+K2hEwjKg4kfpEDE//TBohpa E+h+mki80Tb/FXIlM7hM1e0= Received: (qmail 22389 invoked by alias); 11 Jan 2018 15:29:30 -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 22368 invoked by uid 89); 11 Jan 2018 15:29:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:861 X-HELO: mailout04.t-online.de Received: from mailout04.t-online.de (HELO mailout04.t-online.de) (194.25.134.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jan 2018 15:29:28 +0000 Received: from fwd00.aul.t-online.de (fwd00.aul.t-online.de [172.20.26.147]) by mailout04.t-online.de (Postfix) with SMTP id 5717641A3563; Thu, 11 Jan 2018 16:29:26 +0100 (CET) Received: from [192.168.0.55] (TnKuB+Z1whorxyX3pifuaQR7txmCxM7+A-k8cz0P5yYCABSpscWNUzPxxReq2wswmD@[163.58.16.102]) by fwd00.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eZenF-1NGXFA0; Thu, 11 Jan 2018 16:29:25 +0100 Message-ID: <1515684556.12491.20.camel@t-online.de> Subject: [RX] Fix PR 81819 From: Oleg Endo To: gcc-patches , Nick Clifton Date: Fri, 12 Jan 2018 00:29:16 +0900 Mime-Version: 1.0 X-IsSubscribed: yes Hi, The attached patch fixes PR 81819, which popped up on GCC 7.  I assume it's also there on trunk, but can't build my app with trunk compiler because it's got other issues. Unfortunately I can't add the reproducer test case since it happens only when building a bigger app with LTO.  But I have confirmed that with this fix the app builds and runs. OK for trunk and GCC 7? Cheers, Oleg gcc/ChangeLog: PR target/81819 * config/rx/rx.c (rx_is_restricted_memory_address): Handle SUBREG case. Index: gcc/config/rx/rx.c =================================================================== --- gcc/config/rx/rx.c (revision 256385) +++ gcc/config/rx/rx.c (working copy) @@ -284,6 +284,9 @@ /* Simple memory addresses are OK. */ return true; + case SUBREG: + return RX_REG_P (SUBREG_REG (mem)); + case PRE_DEC: case POST_INC: return false;