From patchwork Mon Jan 9 16:25:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 712851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3ty0rT0Mjlz9t1H for ; Tue, 10 Jan 2017 03:25:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="DE2xWAgD"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=RbZtsCQ2VVQjR+D8F aD/1Gy3VOKUVmGO59Xk+0vY7qkSbrWTGdoCjVLeRvs9kaG2IsfApkj0liIn13FcX sQr5G4uW8W2SeUhARjaLjYi+s6yyLBTxAZjXYgoXr0kKL4xDab548gZd6tK145hA +iqk5VTJ2mBHf9NYYzShuJ2gAA= 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=zw8aA4DJMB703KCW43R6Llj qD3U=; b=DE2xWAgDc+BEIhqubv7lXUuI9HsO5QkiJZkZPf8OcDMRDg2KGunouZo 5pbn74XnCxE6GzMhe+G7CrLCevLuogc3dp7WlLwdL3HoVAwKaYr+HqgXNA+2q12F m7lnb8j8ESEcKudEShP8WiLPTYUBaL1FWy/r2WWBbLBQTBNGB5xk= Received: (qmail 29358 invoked by alias); 9 Jan 2017 16:25:36 -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 29324 invoked by uid 89); 9 Jan 2017 16:25:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=m32m64, H*f:sk:f315d95, H*MI:sk:f315d95, H*i:sk:f315d95 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Jan 2017 16:25:35 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BEED33C16D; Mon, 9 Jan 2017 16:25:35 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v09GPWBu015572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 9 Jan 2017 11:25:34 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v09GPTFq027686; Mon, 9 Jan 2017 17:25:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v09GPSn0027685; Mon, 9 Jan 2017 17:25:28 +0100 Date: Mon, 9 Jan 2017 17:25:28 +0100 From: Jakub Jelinek To: Nathan Sidwell Cc: Jason Merrill , gcc-patches List Subject: Re: C++ PATCH for c++/78948 (instantiation from discarded statement) Message-ID: <20170109162528.GN21933@tucnak> Reply-To: Jakub Jelinek References: <3c22e6d7-0afa-8778-b550-a177c225ccca@acm.org> <20170109140352.GL21933@tucnak> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes On Mon, Jan 09, 2017 at 09:10:06AM -0500, Nathan Sidwell wrote: > On 01/09/2017 09:03 AM, Jakub Jelinek wrote: > > > FAIL: g++.dg/cpp1z/constexpr-if10.C (test for excess errors) > > > > Could we do e.g. > > sed -i -e 's/long long/int */g' testsuite/g++.dg/cpp1z/constexpr-if10.C > > so that it is something where if constexpr will be always true? > > that would seem fine to me Here is what I've committed to trunk then (the testcase still fails with older cc1plus and make check-c++-all RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=constexpr-if*.C' and passes with current cc1plus). 2017-01-09 Jakub Jelinek PR c++/78948 * g++.dg/cpp1z/constexpr-if10.C: Fix PR number in comment. (main): Use int* instead of long long. Jakub --- gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C.jj 2017-01-08 17:41:17.000000000 +0100 +++ gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C 2017-01-09 17:15:54.006314980 +0100 @@ -1,4 +1,4 @@ -// PR c++/79848 +// PR c++/78948 // { dg-options -std=c++1z } template @@ -9,8 +9,8 @@ void sizeof_mismatch() int main() { - if constexpr(sizeof(long long) == sizeof(char*)) + if constexpr(sizeof(int*) == sizeof(char*)) ; else - sizeof_mismatch(); + sizeof_mismatch(); }