From patchwork Tue Jul 3 17:22:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 938839 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-480942-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="De3yIEHp"; 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 41KrXp3ZSNz9s1B for ; Wed, 4 Jul 2018 03:22:31 +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:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=HFRQNkJ1Ewy3nIRRkvrFvhj48KOc8dYsUjLN0ZIAxmUKb55w+q Ez81brbijM3hmKCVzhiMiSP7I6dxLuTdro6rawN64QHJ5dwqizfhxNqOKphIWN1Z coyqRgydCjMbxvUI74s5pbku1QDyxN8RzCH3Ciy5HbuSfNOel6qRsVSEk= 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 :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=Z6NluBM24Cw2uq+J9o/shQeTlj0=; b=De3yIEHpmEehou/6ZuV3 8I6e7V1GwTziGYXPNUz/qnSR0nyJY6pq6VUp8+aIfo9Ckl98zXTBZBHakWmR9CdS tvKFHl7S5WoCJ1kTH/CYRq2V3paqIFvxEfXYxCy720Z37oA8L4kTGsoRhOGjd8PD cEvtTtagdNaRX+c6KzeYIJ8= Received: (qmail 85163 invoked by alias); 3 Jul 2018 17:22:25 -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 85150 invoked by uid 89); 3 Jul 2018 17:22:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=growth X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Jul 2018 17:22:22 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 65803ADB4 for ; Tue, 3 Jul 2018 17:22:20 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Fix bootstrap on ia64 with old GCC version. To: gcc-patches@gcc.gnu.org Cc: Michael Matz Message-ID: Date: Tue, 3 Jul 2018 19:22:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi. In order to make GCC 4.1 happy and build current tip, we need to define static constants out of a class definition. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2018-07-03 Martin Liska * tree-switch-conversion.h (struct jump_table_cluster): Define constant values outside of class declaration. --- gcc/tree-switch-conversion.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h index 4beac785f05..8efb125aff1 100644 --- a/gcc/tree-switch-conversion.h +++ b/gcc/tree-switch-conversion.h @@ -259,12 +259,17 @@ struct jump_table_cluster: public group_cluster static bool is_enabled (void); /* Max growth ratio for code that is optimized for size. */ - static const unsigned HOST_WIDE_INT max_ratio_for_size = 3; + static const unsigned HOST_WIDE_INT max_ratio_for_size; /* Max growth ratio for code that is optimized for speed. */ - static const unsigned HOST_WIDE_INT max_ratio_for_speed = 8; + static const unsigned HOST_WIDE_INT max_ratio_for_speed; }; +const unsigned HOST_WIDE_INT jump_table_cluster::max_ratio_for_size = 3; + +const unsigned HOST_WIDE_INT jump_table_cluster::max_ratio_for_speed = 8; + + /* A GIMPLE switch statement can be expanded to a short sequence of bit-wise comparisons. "switch(x)" is converted into "if ((1 << (x-MINVAL)) & CST)" where CST and MINVAL are integer constants. This is better than a series