From patchwork Tue Aug 20 23:36:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 1150492 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507405-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=golang.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BcjU4RAS"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=golang-org.20150623.gappssmtp.com header.i=@golang-org.20150623.gappssmtp.com header.b="pN8iFAJt"; 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 46CnJM4z5gz9s7T for ; Wed, 21 Aug 2019 09:37:05 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:references:in-reply-to:from:date:message-id :subject:to:cc:content-type; q=dns; s=default; b=C+gqBP1DZltSepg 5mz7/75gvKXSKlyRs8HidJ+8zSy0XHYyYv8aCQCq+jgPEMlfmprc7Klas5M/8WXl bU22R7pGPsY/EZErX5Uh+LQYrvc7Xz+UtUkVeml4oO5G04p6GE3E0xqvMNddMUyS mH6EJNGnRCjyq6mUxR9LFTljR2P0= 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 :mime-version:references:in-reply-to:from:date:message-id :subject:to:cc:content-type; s=default; bh=dn3Y9P730Hx+PA8fZmjeJ OnI5Bs=; b=BcjU4RASofXsYsKhCAGr4lSTQM55suFRibLPrFKs48c5cZ77GiEL7 mq8ZPFE42bHAaVpbZpvxHBeqmcTTcfcu001k+yi68Lp/bM3xAgRp3N1MUpId8DWo XMWtcJOaT/lKHd9Efw99qre/198F6wu7Uqgt5p0i7qHLv4NMkCnVRQ= Received: (qmail 103386 invoked by alias); 20 Aug 2019 23:36:57 -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 103377 invoked by uid 89); 20 Aug 2019 23:36:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Received:8085 X-HELO: mail-lj1-f196.google.com Received: from mail-lj1-f196.google.com (HELO mail-lj1-f196.google.com) (209.85.208.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Aug 2019 23:36:55 +0000 Received: by mail-lj1-f196.google.com with SMTP id h15so359079ljg.10 for ; Tue, 20 Aug 2019 16:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eGabW6/ZI1VH5KtVjVVxvBvKUS4syS3RmbYfHSGIhyw=; b=pN8iFAJtr4qQOBYnFCPA2sxN3WnhDx3NsMsieGucTBYHb+2oneQYjszERBhIoGn16g GlZDMQpAxjNW49o/0JJIGR8O8GOzk95tRPsnESKQhSK1/kM/3Hqd3+mm9qpTjKem1Ztt hiK+DIrF6tkF5uvRqccDlqFRBRgN+0Jsjwg/t1JM102dQpIcrmoXh5X1Daui1tvljqoq e7PbKuKvNMuPL8WksBiFwdWDzsSPFhClClpiJMoR+4i4Ov0/1Uxz+NW9aewas8u/JBrK PH2U9ZPOpAtpM6r9rmTAQQSF9y9One/IXOoUS+m4uqu9XjdEGkklv63+uWOy96IrFOzR EV6w== MIME-Version: 1.0 References: In-Reply-To: From: Ian Lance Taylor Date: Tue, 20 Aug 2019 16:36:22 -0700 Message-ID: Subject: Patch RFA: [C family frontend]: avoid weird constant values in libgo/sysinfo.go To: Xiangdong JI , gcc-patches Cc: golang-nuts , gofrontend-dev On Mon, Aug 12, 2019 at 8:21 PM Xiangdong JI wrote: > > The .go files generated during building gccgo seem to have a few constants with weird values, for example: > > // sysinfo.go (on x86-64, latest gcc-9 trunk) > > const ___FLT128_MAX__ = 1.1 > const ___FLT32X_DENORM_MIN__ = 1.1 > > as a comparison, gollvm generates expected values. > Could it be caused by incorrect building setting? Per later discussion, this problem is fixed by this patch. Bootstrapped and ran full testsuite on x86_64-pc-linux-gnu. OK for mainline? Ian 2019-08-20 Ian Lance Taylor * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand when using -fgo-dump-spec. Index: c-family/c-cppbuiltin.c =================================================================== --- c-family/c-cppbuiltin.c (revision 274749) +++ c-family/c-cppbuiltin.c (working copy) @@ -1643,6 +1643,7 @@ builtin_define_with_hex_fp_value (const /* This is very expensive, so if possible expand them lazily. */ if (lazy_hex_fp_value_count < LAZY_HEX_FP_VALUES_CNT && flag_dump_macros == 0 + && flag_dump_go_spec == NULL && !cpp_get_options (parse_in)->traditional) { if (lazy_hex_fp_value_count == 0)