From patchwork Tue Jan 16 12:11:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 124663 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp991141lje; Tue, 16 Jan 2018 04:11:50 -0800 (PST) X-Google-Smtp-Source: ACJfBovdqfs8LLXyKmacPIL0tQzb7CAdYFm7uCumZrNYsof5G7RUrBesdAIayMqwbJnlcswSwNom X-Received: by 10.98.29.2 with SMTP id d2mr23438094pfd.204.1516104710102; Tue, 16 Jan 2018 04:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516104710; cv=none; d=google.com; s=arc-20160816; b=nelxuOd6xCcoV81PXQfPk2CvmisBzNOuCZkqQ+QZKOfCRJlN/Q6dscfihu0vb2ZXLP IIaTHU4PaccmuGGChXWsAXAy8tODpoX6Y6GljREyChfGPs2H/gZOKB5ZkzxLfaZEIfWJ fK5/G2mMv4TgNPXHFZFeUscU6fPxfXBFP1BLviB1/39cwCDxCHzffLT5Qg3mPCignf7w /U8IraqaHh9YqfvCHYd1fw1L/bhRCvPXGmqPmA6PsATovXjefZ5UaFtUZ2IdE2yQMo30 dP1BdyCkyrTaqGnkQao++PN641NyC4YHNadmyZmm1U5I+uGmqUZvCPJLmVqNTBerXwnU ciIw== 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=D7bS7wVp8z894RzDwJhMyuPiB7iDqvl6N82IFwkBbnQ=; b=d7Lu0HT82S+qBk7zDDCB7ZZJyGBXDT+YsOUQyEnumIDwJCodOvvhfxQf4MyFvMORvK 6JkMsyRPChvTOfh/Y1E2ixYOHqaHIMsvYu14z7Lq8OOtxvXGOJIy8CyJPbwIlyNidiU9 w5oVVSrlqeZTwAIyz5SWkwNOPZjO4qjPq/D3g8AOpNhwjwyAoOI3DOpsXYdW0LPtVCkL FpWRXY5rPEfvHGGu1GxD3CWV84v5/cjKWYQcrqWVxrX0Te+GkFJq0Lxarvx6u0zaq32c URR4Oz8yu5AijmRP7K+OUQ342eL5PHPrAPULiuqi8buCFmryxxfkSkcuTh1hHBZ3pBIB Htvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=fVMMxSV+; spf=pass (google.com: domain of gcc-patches-return-471360-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471360-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 p1si1786050pld.5.2018.01.16.04.11.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 04:11:50 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-471360-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=fVMMxSV+; spf=pass (google.com: domain of gcc-patches-return-471360-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471360-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=VhHXKOxakR0Xm8bbkBj3ZsZxWgmkqZAL3h/zBsVZDqStv/BUwtMNB 1Tyrte0SM9jBXwojkzRxRx7ue+8R2e8DNiDgfVGCmKQwOxi5ftqD3sVsjetFtaXx 8msMxdEYKq8GBfjfr/e+PVzhZHAzjZGUAZCpvDEoniA4bFgDXoVJZw= 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=MgYv41X60Yakg6+B59wzFNdBwXU=; b=fVMMxSV+VVvW/t93CTow ALaS6B2DFU/54ugHnlhILqS/lHh8QjgmynE3fRmHEUN0xoSPlzNaApcJLi9k+dKy bzMXwwXsa5xdLAqIJk20I2UdDmpMle56A3sdf5a57hhT5bbISbW4Tx0MosYrCBBf GAUEt9zu6Ff5lSfpxNQkBcg= Received: (qmail 74704 invoked by alias); 16 Jan 2018 12:11:38 -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 74686 invoked by uid 89); 16 Jan 2018 12:11:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f50.google.com Received: from mail-wm0-f50.google.com (HELO mail-wm0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jan 2018 12:11:32 +0000 Received: by mail-wm0-f50.google.com with SMTP id i186so7874362wmi.4 for ; Tue, 16 Jan 2018 04:11:32 -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=D7bS7wVp8z894RzDwJhMyuPiB7iDqvl6N82IFwkBbnQ=; b=mlzm8u8yBGTfe9p4o0lJrvUpjXVkWwoWSYp9wBafJwo9atpOmMnKaSnshDhWWRCQFk ojL7m/XW0hXz1gJeBxksSA2Sov9PJ+kqwpdntlyNEOF92akgSKy+Td0PUv0W6s1O9teW fR6txGllYnVqn7yREPRQ8SmRCUWhCdCclZi7sWKHIj8ejXwdsgq/nycFAssbf49fPfer V3T8FqtOpBKcWITdbUBJofnj+e0i36rNzUKIhMKPBgJ07l2hef9tB5Y3Jy88mEZAFFGT Jy3xOg/nFglZqOpRZoZSyexvUNfG3MBUaQDCepIdzi1HoP4SIfX7tFQp86TLihTesjp5 96Ow== X-Gm-Message-State: AKwxytdfjdv9ofYQVgnssgpbhl0sdfp9kXI+HkWFC7SvFUADHifVJmAW 10Aeo8kevr24W6WisT8M1FImiToFGTY= X-Received: by 10.28.232.131 with SMTP id f3mr13694079wmi.69.1516104690136; Tue, 16 Jan 2018 04:11:30 -0800 (PST) Received: from localhost ([95.144.14.233]) by smtp.gmail.com with ESMTPSA id a73sm3517705wrc.53.2018.01.16.04.11.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jan 2018 04:11:29 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Avoid GCC 4.1 build failure in fold-const.c Date: Tue, 16 Jan 2018 12:11:28 +0000 Message-ID: <87bmhuxatr.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 We had: tree t = fold_vec_perm (type, arg1, arg2, vec_perm_indices (sel, 2, nelts)); where fold_vec_perm takes a const vec_perm_indices &. GCC 4.1 apparently required a public copy constructor: gcc/vec-perm-indices.h:85: error: 'vec_perm_indices::vec_perm_indices(const vec_perm_indices&)' is private gcc/fold-const.c:11410: error: within this context even though no copy should be made here. This patch tries to work around that by constructing the vec_perm_indices separately. Tested on aarch64-linux-gnu. OK to install? Richard 2018-01-16 Richard Sandiford gcc/ * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices in a separate statement. Index: gcc/fold-const.c =================================================================== --- gcc/fold-const.c 2018-01-15 12:38:28.967896418 +0000 +++ gcc/fold-const.c 2018-01-16 12:08:10.082222501 +0000 @@ -11406,8 +11406,8 @@ fold_ternary_loc (location_t loc, enum t else /* Currently unreachable. */ return NULL_TREE; } - tree t = fold_vec_perm (type, arg1, arg2, - vec_perm_indices (sel, 2, nelts)); + vec_perm_indices indices (sel, 2, nelts); + tree t = fold_vec_perm (type, arg1, arg2, indices); if (t != NULL_TREE) return t; }