From patchwork Thu Jul 28 09:43:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 107220 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]) by ozlabs.org (Postfix) with SMTP id 0CC2FB6F76 for ; Thu, 28 Jul 2011 19:44:36 +1000 (EST) Received: (qmail 16174 invoked by alias); 28 Jul 2011 09:44:34 -0000 Received: (qmail 16084 invoked by uid 22791); 28 Jul 2011 09:44:33 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from acsinet15.oracle.com (HELO acsinet15.oracle.com) (141.146.126.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jul 2011 09:44:19 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p6S9iG91025350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Jul 2011 09:44:18 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p6S9iGec025446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 28 Jul 2011 09:44:16 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p6S9iAFW031015; Thu, 28 Jul 2011 04:44:10 -0500 Received: from [192.168.1.4] (/79.33.222.35) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 28 Jul 2011 02:44:10 -0700 Message-ID: <4E312F5D.2050304@oracle.com> Date: Thu, 28 Jul 2011 11:43:57 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Andreas Schwab CC: "gcc-patches@gcc.gnu.org" , libstdc++ , Jason Merrill Subject: Re: [v3] Library bits of c++/49813 References: <4E30687F.4070601@oracle.com> In-Reply-To: X-IsSubscribed: yes 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 Hi Andreas, > /usr/local/gcc/gcc-20110728/Build/ia64-suse-linux/libstdc++-v3/include/cmath: > In function 'constexpr float std::fma(float, float, float)': > /usr/local/gcc/gcc-20110728/Build/ia64-suse-linux/libstdc++-v3/include/cmath:1288:43: > sorry, unimplemented: unexpected ast of kind fma_expr > /usr/local/gcc/gcc-20110728/Build/ia64-suse-linux/libstdc++-v3/include/cmath:1288:43: > internal compiler error: in potential_constant_expression_1, at > cp/semantics.c:8094 in the past we encountered already a few small problems of this kind, with cases missing from the potential_constant_expression_1 switch. I believe something quite close to what I'm attaching below should be enough, can you give it a try? In any case, we definitely want Jason to have a look as soon as possible. If you want to restore the ia64 bootstrap in the meanwhile, feel free to comment out any troublesome constexpr specifier in that file (or replacing it with inline). Thanks! Paolo. ////////////////////// Index: semantics.c =================================================================== --- semantics.c (revision 176846) +++ semantics.c (working copy) @@ -8057,6 +8057,13 @@ potential_constant_expression_1 (tree t, bool want return false; return true; + case FMA_EXPR: + for (i = 0; i < 3; ++i) + if (!potential_constant_expression_1 (TREE_OPERAND (t, i), + true, flags)) + return false; + return true; + case COND_EXPR: case VEC_COND_EXPR: /* If the condition is a known constant, we know which of the legs we