From patchwork Tue Jul 18 09:44:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 790044 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-458395-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="S9pYO7qh"; 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 3xBZyX6f14z9t2J for ; Tue, 18 Jul 2017 19:45:04 +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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=snXMMa82NBF4jFplLDWFbB/knViirjPhGXJ3fEJAKWm324i9/m lVhuDmZXB3Qma6t3dblr/2tWOIFHKmnRdtNAsImkSvfxMbiUhEBtFGhsKtQEBgD1 /JZi5VUe2url2rqkAV0qg0WzD4LP8obXD62dwGa2vY6h02ttvaIPTw7uw= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=yb0nZAwp4OEE9J+ZM9WYFoYR8Hg=; b=S9pYO7qhk99MjAr2CF41 lRk6+AdboUOrrqMnh19kvJF54bY8KN6UgbTj/zqmMIbnKa+h5bjweZqBTYBKja3b Tt2vQNZiEb8SUp+lZrEt74QAqZ+1cE53ytvbZDU0NQGAyWSgzznW9OyfjcsY96sK IWzM0y+9QbdVu2Xbr/VpPUM= Received: (qmail 48122 invoked by alias); 18 Jul 2017 09:44:54 -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 48098 invoked by uid 89); 18 Jul 2017 09:44:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=friends X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.219) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jul 2017 09:44:51 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwR/bcHRirORRW3yMcVao= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (mail.hightec-rt.com [213.135.1.215]) by smtp.strato.de (RZmta 41.1 DYNA|AUTH) with ESMTPSA id a012e8t6I9ilAqZ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 18 Jul 2017 11:44:47 +0200 (CEST) To: gcc-patches Cc: Denis Chertykov From: Georg-Johann Lay Subject: [patch,avr.applied] Fix PR81473: Don't use INT8_MIN etc. Message-ID: Date: Tue, 18 Jul 2017 11:44:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 X-IsSubscribed: yes https://gcc.gnu.org/r250301 https://gcc.gnu.org/r250302 Removed usage of INT8_MIN and friends as they are not available in older C++ which leads to build failure. Applied to trunk and v7 branch. Johann gcc/ Backport from 2017-07-18 trunk r250301. PR target/81473 * config/avr/avr.c (avr_optimize_casesi): Don't use INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX. Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 250258) +++ config/avr/avr.c (working copy) @@ -553,9 +553,9 @@ avr_optimize_casesi (rtx_insn *insns[6], HOST_WIDE_INT hig_idx = low_idx + num_idx; // Maximum ranges of (un)signed QImode resp. HImode. - int imin = QImode == mode ? INT8_MIN : INT16_MIN; - int imax = QImode == mode ? INT8_MAX : INT16_MAX; - unsigned umax = QImode == mode ? UINT8_MAX : UINT16_MAX; + unsigned umax = QImode == mode ? 0xff : 0xffff; + int imax = QImode == mode ? 0x7f : 0x7fff; + int imin = -imax - 1; // Testing the case range and whether it fits into the range of the // (un)signed mode. This test should actually always pass because it