From patchwork Tue Oct 28 20:26:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 404328 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 792D7140081 for ; Wed, 29 Oct 2014 07:27:09 +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:from :to:cc:subject:date:message-id; q=dns; s=default; b=gzYzoD0Aodwa Z/ZaiVMYcmsjyFqK/X+rq2ifKLqUYCO/LCbF3ZP8SVPSrSGG69XJVW//eAitpfZT FqpboJOjBZJ3z5/XMep/BRYkbtpyl5293+m+HDw/ihNPHAvaiIC4Bl/UABlbBjS6 ip6MgTbOBlfDIamkJjvkFCYqTaO3ns0= 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:cc:subject:date:message-id; s=default; bh=vcfP/4XvqtmK4+i6yj EM73AYakA=; b=wyOmJgyQZkwBzu6DlKVMgHaWMlcWg58y87xPMehxVQrAJUmMyy El2cbNQbp9y3Zw57gJLpnXHVEnneyohGbG11jC6SKNXRIg/hBtAWdlKd2WKpktII ihgPVDXT2CBDcu6VJe6BbHguU/i3QII1CUiBfjqZhgN4Xh3Z3Q7gqbHfs= Received: (qmail 7844 invoked by alias); 28 Oct 2014 20:27:01 -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 7832 invoked by uid 89); 28 Oct 2014 20:27:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f45.google.com Received: from mail-qg0-f45.google.com (HELO mail-qg0-f45.google.com) (209.85.192.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 28 Oct 2014 20:26:58 +0000 Received: by mail-qg0-f45.google.com with SMTP id z107so1181374qgd.4 for ; Tue, 28 Oct 2014 13:26:56 -0700 (PDT) X-Received: by 10.140.51.102 with SMTP id t93mr8406293qga.72.1414528016597; Tue, 28 Oct 2014 13:26:56 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id 36sm2231099qgn.10.2014.10.28.13.26.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Oct 2014 13:26:55 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com Subject: [COMMITTED] longlong.h: Disable alpha umul_ppmm for old g++ Date: Tue, 28 Oct 2014 13:26:24 -0700 Message-Id: <1414527984-22889-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes I can't tell if this is fixed on mainline, because __builtin expansion happens at a different time, or if it's still broken but hidden somehow. But using gcc 4.8 as a bootstrap compiler for alphaev67-linux, we get a "sorry: unexpected AST of kind MULT_HIGHPART". It seems easiest to simply disable this for pre-g++-5 to allow bootstrap to succeed. r~ * longlong.h [__alpha] (umul_ppmm): Disable for c++. --- include/ChangeLog | 4 ++++ include/longlong.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index d2d1472..e482682 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2014-10-28 Richard Henderson + + * longlong.h [__alpha] (umul_ppmm): Disable for c++. + 2014-10-28 Yury Gribov * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. diff --git a/include/longlong.h b/include/longlong.h index 42c68dd..8cd2c79 100644 --- a/include/longlong.h +++ b/include/longlong.h @@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden; #endif /* __aarch64__ */ #if defined (__alpha) && W_TYPE_SIZE == 64 +/* There is a bug in g++ before version 5 that + errors on __builtin_alpha_umulh. */ +#if !defined(__cplusplus) || __GNUC__ >= 5 #define umul_ppmm(ph, pl, m0, m1) \ do { \ UDItype __m0 = (m0), __m1 = (m1); \ @@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden; (pl) = __m0 * __m1; \ } while (0) #define UMUL_TIME 46 +#endif /* !c++ */ #ifndef LONGLONG_STANDALONE #define udiv_qrnnd(q, r, n1, n0, d) \ do { UDItype __r; \