From patchwork Wed Nov 20 22:58:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1198572 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-514255-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mD9YPgG3"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="N+4ulsW9"; 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 47JJ5H6Jtwz9sPT for ; Thu, 21 Nov 2019 09:58:25 +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:date :from:to:cc:subject:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=DiE2ihdSL5Zdt5Hp OpkvUdqPYmuCzexpf9k2O93h1y1a4OhCAzYyQs0n5WtTXUzPTZyCZ1uukcCoeyFJ m7PO9CduY7MmRVBodIMAZlgDUyRzjUTtjigdiAkjEIDiDRfGG80MoD9NWORU4kkO 8aMDWgc9PySt42Lh3iL7ea8JG0s= 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:mime-version:content-type :content-transfer-encoding; s=default; bh=LQwB1BlA7JhKQres1mtf7f 74/4A=; b=mD9YPgG3LijKSUPuxQ8ZaqjLlBF7P2yOEcXL70p+dm2zLn4yQ+CQMg mh53MyMMR6fSjpgJTGqAPC5+r5su9gIKZ20ziz80neThzOCghG4ybJQ94FBPFxj0 0LZgOz0lWotvADa6ydsRbqgLgV86HXluRoy3IBubebDx9RGx0ug5U= Received: (qmail 92293 invoked by alias); 20 Nov 2019 22:58:18 -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 92284 invoked by uid 89); 20 Nov 2019 22:58:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.1 spammy=friend X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Nov 2019 22:58:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574290695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fwDeTc4btbSFHsn51y+cFcDTFJcUqfqSAuQtJTQAa1E=; b=N+4ulsW9KZL5+YVHhBKSohGwnnPmHJjwhGqyLZ/HGpCUq7ncU9H+NTVyIsBHjZjmgV5KVI wvT2kJmRR6epSE8jeXBLUJth5H3AkMDUhzVSmyw3mZp/VKmaaCxdWQKJ78hxuzS+Nwq3Fu Nq6o+n7cZQw6LysIYtmWlUTnPEU1jQA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-SEgTY0vOMECj93Iic_dP-w-1; Wed, 20 Nov 2019 17:58:13 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DFDD2107ACC5 for ; Wed, 20 Nov 2019 22:58:12 +0000 (UTC) Received: from redhat.com (unknown [10.20.4.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 928FD5F761; Wed, 20 Nov 2019 22:58:12 +0000 (UTC) Date: Wed, 20 Nov 2019 17:58:10 -0500 From: Marek Polacek To: GCC Patches Cc: Jason Merrill Subject: [committed] Add test for c++/92443 Message-ID: <20191120225810.GC3791@redhat.com> MIME-Version: 1.0 User-Agent: Mutt/1.12.1 (2019-06-15) X-Mimecast-Spam-Score: 0 Content-Disposition: inline This started crashing with the <=> implementation but has now been fixed by r278465. Tested on x86_64-linux, applying to trunk. 2019-11-20 Marek Polacek PR c++/92443 * g++.dg/cpp0x/constexpr-92443.C: New test. diff --git gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C new file mode 100644 index 00000000000..8d03e3ed871 --- /dev/null +++ gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C @@ -0,0 +1,12 @@ +// PR c++/92443 +// { dg-do compile { target c++11 } } + +struct a { + constexpr a(long) : b() {} + operator long() const; + operator bool(); + constexpr friend a operator|(a, a c) { return c; } + long b; +}; +using d = a; +constexpr d e = 6, f = f | e;