From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43307 invoked by alias); 4 Dec 2018 14:47:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 43298 invoked by uid 89); 4 Dec 2018 14:47:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1451 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; Tue, 04 Dec 2018 14:47:26 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 939B530832D2 for ; Tue, 4 Dec 2018 14:47:25 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B70D60E3F; Tue, 4 Dec 2018 14:47:25 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wB4ElN1d024861; Tue, 4 Dec 2018 15:47:23 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wB4ElLRl024860; Tue, 4 Dec 2018 15:47:21 +0100 Date: Tue, 04 Dec 2018 14:47:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: C++ patch ping Message-ID: <20181204144721.GA12380@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00196.txt.bz2 Hi! I'd like to ping PR87506 - https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01758.html You've acked the patch with the asserts but that FAILs as mentioned in the above mail. The following has been bootstrapped/regtested and works, can it be committed without those asserts and let those be handled incrementally later (though, I'm afraid I'm not familiar enough with resolving those). Thanks. 2018-11-21 Jakub Jelinek PR c++/87506 * constexpr.c (adjust_temp_type): Handle EMPTY_CLASS_EXPR. * g++.dg/cpp0x/constexpr-87506.C: New test. --- gcc/cp/constexpr.c.jj 2018-11-16 21:35:34.551110868 +0100 +++ gcc/cp/constexpr.c 2018-11-19 09:35:06.880386449 +0100 @@ -1280,6 +1280,8 @@ adjust_temp_type (tree type, tree temp) /* Avoid wrapping an aggregate value in a NOP_EXPR. */ if (TREE_CODE (temp) == CONSTRUCTOR) return build_constructor (type, CONSTRUCTOR_ELTS (temp)); + if (TREE_CODE (temp) == EMPTY_CLASS_EXPR) + return build0 (EMPTY_CLASS_EXPR, type); gcc_assert (scalarish_type_p (type)); return cp_fold_convert (type, temp); } --- gcc/testsuite/g++.dg/cpp0x/constexpr-87506.C.jj 2018-11-19 09:33:07.795341369 +0100 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-87506.C 2018-11-19 09:33:07.795341369 +0100 @@ -0,0 +1,12 @@ +// PR c++/87506 +// { dg-do compile { target c++11 } } + +struct A {}; +struct B { constexpr B (const A) {} }; +struct C : B { using B::B; }; + +void +foo () +{ + C c (A{}); +} Jakub