From patchwork Wed Mar 4 23:26:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1249336 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-520672-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.a=rsa-sha1 header.s=default header.b=iZ0TO2na; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BQ8F6bXk; 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 48XqlB4KQdz9s3x for ; Thu, 5 Mar 2020 10:26:28 +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 :message-id:subject:from:reply-to:to:date:mime-version :content-type; q=dns; s=default; b=fZUwsPxoP8Lc9dkHRjNGsCrNRINtP yARuG9hPYIS8h4nzKDIe1ydp5JgCxGpQOvwjyERGjAq1XeCJ5By+jrN9XnyVEMJZ pGnQqSD+SfPQ6Z7QgCrMOTeguCoYSyrmcKdEr795TncAF61GGoI0v9TMRsYjLl4Q bOxZqJ/wFl7mXg= 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 :message-id:subject:from:reply-to:to:date:mime-version :content-type; s=default; bh=sNP1vRDpdivp6Ae6uwUS24cGJ4Q=; b=iZ0 TO2nacOPi8XAVygM15luQlNTocrF+/Bsaj8lQswBFnHYZQH+j1xMN0l2z8nJls3z u7ESa+JxH9G1FihH6gxQjNwsDkOCXXVA5mSKrMweW89PVPa/Z9WTKfDyZHO71Ocu nz43hCzBLE9sfvyiqVLNBtTqRzJIAgh30eblwo9E= Received: (qmail 123029 invoked by alias); 4 Mar 2020 23:26:19 -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 122981 invoked by uid 89); 4 Mar 2020 23:26:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=showed, HX-Languages-Length:1762 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Mar 2020 23:26:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583364377; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=TKw90NOcInK420iaQIIje3GB9k9GNJQhZuostPewiMQ=; b=BQ8F6bXkOnKBTv32IatQq9012tujZfWWjTQZBIKhkwYbo0FD3M2s4Jn+IVbx8Swpvh3SCW Nn680UU9RrjZU6QEdY8Z6xdmN60UI9rokO1Hd2U+FfikbDN00q0SO5Vjztd4niHW6qKijr zMy9QLIMXKPeE4BSaubkrHbOwmGcaKM= 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-317-uJ6Y0K9XM22AH5w36hdUgQ-1; Wed, 04 Mar 2020 18:26:15 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2432F800D48 for ; Wed, 4 Mar 2020 23:26:14 +0000 (UTC) Received: from ovpn-116-163.phx2.redhat.com (ovpn-116-163.phx2.redhat.com [10.3.116.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB7745D9C9 for ; Wed, 4 Mar 2020 23:26:13 +0000 (UTC) Message-ID: Subject: [committed][PR bootstrap/93962] Fix bootstrap issue on freebsd From: Jeff Law Reply-To: law@redhat.com To: gcc-patches List Date: Wed, 04 Mar 2020 16:26:13 -0700 User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-IsSubscribed: yes PR 93962 reports a bootstrap failure on FreeBSD 11.3 due to a format warning. Andrew Pinski recommended using std::abs rather than a naked abs. I bootstrapped and regression tested that on x86_64-linux-gnu. I was unable to reproduce the failure in a FreeBSD VM. However Gerald (the reporter) was able to confirm that using std::abs worked to fix the problem in their builds. I'm committing the change to std::abs based on Gerald's testing as well as my own. I'm going to remove the regression marker, but keep the BZ open as Jakub wants the CPP output to try and figure out what's going on at a deeper level. Jeff commit 20a235a8b443a81ea0ec6a10f260b119f2193a69 Author: Jeff Law Date: Wed Mar 4 16:25:11 2020 -0700 Fix format warning which showed up on FreeBSD 11.3. PR bootstrap/93962 * value-prof.c (dump_histogram_value): Use std::abs. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0df606a8211..5b2e4a83721 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-03-04 Andrew Pinski + + PR bootstrap/93962 + * value-prof.c (dump_histogram_value): Use std::abs. + 2020-03-04 Martin Sebor PR tree-optimization/93986 diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 8e9f129708a..585b909096f 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -266,7 +266,7 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) if (hist->hvalue.counters) { fprintf (dump_file, " all: %" PRId64 "%s, values: ", - abs ((int64_t) hist->hvalue.counters[0]), + std::abs ((int64_t) hist->hvalue.counters[0]), hist->hvalue.counters[0] < 0 ? " (values missing)": ""); for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)