From patchwork Wed Nov 22 09:26:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 119440 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6450047qgn; Wed, 22 Nov 2017 01:27:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMYt/UeHxcv27+B4UYWVFTnvxf+aQjIFdnOp+rENSksuGRMBkGsuWHlf/UkKh+xz2L9t1oT1 X-Received: by 10.99.100.67 with SMTP id y64mr19952840pgb.19.1511342826438; Wed, 22 Nov 2017 01:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511342826; cv=none; d=google.com; s=arc-20160816; b=Yr3kmvFscVToWjjywEBsU7xZzZbH/QmAH/9xbZAzmQ9FRl8552vVxXB+OKodnxaLP1 fOM7ZqZgPByWt+i0FGURkr9bjICLqbXjlQrZkeiDlSyycH98WS8oxn0+QwBLk/KsS3vd pQWqhgpHn9XT/OfVfb3AJ7zagi+mPjizI2gaLw8cd0JGkffyM6UQnBrTVGUvi4GE/7/O zbyZvaadf/6iKg1iKuxSi/zytqgfyoPqKlUckRZef9m7wZLGUQzkl2adcENDM1riJuAX bT4LKMb6IxIG5Dh+xCL++n30+zpluhFoYNxY7wtZhUZHFWSNEcYhPbqW4Y2kf41nURqM mfyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=G2AoUN6Ojh/7NMqHVw7qnEfm0BeYom+QkYVczd97PpQ=; b=LrMtMfXqXOaOvcxezIMS+gTxCVMOZjRqPOnzYAq8bleylw7MdOQcUc07QgfrtY17UZ qauFQZKZ6D2hoI8B1anfgn76utbj44H5nKvcInVxI3LesqnKvLcNJtxexRhY1p4i8pPp XPAECTmIf+sUxF09r103bzOjhIB6PUCpshpXuIH7glgjgUMkX0Uy83U1cBBz9xBigf54 zvK1oIO0roTT1hayuNsU+hz0oypH4X5m8uh0HFPvFSfXXH+aOTWVpSfuVj+7r14BedUg 0OJQOLMylDkSVBMankexIF3+iwlVu5QGGSG9701aKJa8+KI/vFBW2HIVKj84IzOuTvA2 VMfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=HHm+yhIs; spf=pass (google.com: domain of gcc-patches-return-467641-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-467641-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j23si1513835pll.748.2017.11.22.01.27.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 01:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-467641-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 header.s=default header.b=HHm+yhIs; spf=pass (google.com: domain of gcc-patches-return-467641-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-467641-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=Zgq8jZNml4H/yeHPo+CBOtLpw01iOkKgU8TbsXk/fM4Y3KNmiDe9V eldFsfWdkYeFZ5TY1wo7TtNhLMQ+bDCqtaUezwpehi6+xRougMGGMwp7ISyG/iCL Jh0hBCEcDihxnK8xpq4F3sHrAgRSX5I4sVqLbYdcC0H8CAT4b1XwbM= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=d4b/z+4tcv2DisvH6XrBo2lXuiw=; b=HHm+yhIs9i7GHz61bX8J XYxbMLGl1elEWanLs/46VPUGoSbGZpIIbMQaPlfUAw0Njf6Rr+Tk8w9eB7cRxsLr RwnruMIfPl5RaAcMvPFLkuJvKmh1FjT6xxJ3JLiHnVVCn7gYhqxrMmjdm67cKke8 Db6o9Vn315YxRCsjYfhkCVA= Received: (qmail 4803 invoked by alias); 22 Nov 2017 09:26:54 -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 4184 invoked by uid 89); 22 Nov 2017 09:26:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1080 X-HELO: mail-wr0-f174.google.com Received: from mail-wr0-f174.google.com (HELO mail-wr0-f174.google.com) (209.85.128.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Nov 2017 09:26:52 +0000 Received: by mail-wr0-f174.google.com with SMTP id z14so13873811wrb.8 for ; Wed, 22 Nov 2017 01:26:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=G2AoUN6Ojh/7NMqHVw7qnEfm0BeYom+QkYVczd97PpQ=; b=l4iPzpGdMdEbNdkRX57q1PEMW14RmrLODj+BG+4oRFe72NYpM+UeYcFtTzEruvLz1K EEbQmZPeS1VDmcgMGNLvzVPa6/ShdPl75JcwsH8lJ9kHXmrf02Yedrh7j4FpQyAm/f32 +a+NUE9VPyOiPMP+eM3qIyAArcSe6Bo9LUHEp6+py4UamuvjaozImWxNBoGaw27ng9bB a7CC6nl4zbxefhvdtjc/f3yG5bdPWAm0xMsj5AGvc1ALH1aluQ2D+opAYu8oIq8+mxLK 54XKCheqbhgFdVM3WUhBIxblWsnLMNhYx+KmeqBJoHm/0p0qPFHbCILlWJ6VYTcOh13f bLGQ== X-Gm-Message-State: AJaThX6zGD4vWIfLytA0gYIhyLPr+H0FbNS/3joD6HVsdpioMo8fv98X u3lob9MzcT1wxY4GkyYYARWIjizfgao= X-Received: by 10.223.186.9 with SMTP id o9mr7767056wrg.221.1511342810381; Wed, 22 Nov 2017 01:26:50 -0800 (PST) Received: from localhost ([2.25.234.120]) by smtp.gmail.com with ESMTPSA id p81sm11296526wrc.61.2017.11.22.01.26.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2017 01:26:49 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode Date: Wed, 22 Nov 2017 09:26:48 +0000 Message-ID: <87d14a1x5z.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 This patch fixes a regression caused by r251469, where I'd incorrectly converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also spot-checked on msp430-elf. OK to install? Richard 2017-11-22 Richard Sandiford gcc/ * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode has the same mode class as Pmode. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c 2017-11-22 09:21:12.560954668 +0000 +++ gcc/emit-rtl.c 2017-11-22 09:25:24.200002574 +0000 @@ -6003,7 +6003,8 @@ init_derived_machine_modes (void) byte_mode = opt_byte_mode.require (); word_mode = opt_word_mode.require (); - ptr_mode = int_mode_for_size (POINTER_SIZE, 0).require (); + ptr_mode = as_a + (mode_for_size (POINTER_SIZE, GET_MODE_CLASS (Pmode), 0).require ()); } /* Create some permanent unique rtl objects shared between all functions. */