From patchwork Wed Nov 21 14:18:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1001176 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-490634-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OBUcOQPB"; 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 430PnJ06B8z9s3C for ; Thu, 22 Nov 2018 01:18:27 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=VxQGipbNWZXBsb2Lqil7UOFS4OmV5hQgUjeZWWZo+ApaQkE10rols +U0UP2i4JHZSLTKi0MSVYZsJBBvzurSWA43KYmKv+0eAzkroSVmr6H6+g7a3IZWe R/87oBT3PEMUpb6I4n1SiRUx+S1zJm10JRzJwWmyozI2K/1ahgFAH8= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=hGq9ombWgZARui8+VHYifzipYYI=; b=OBUcOQPB+6lR1h3P33+3 h8+9b/Oree0W6dJn4o8J2fxMbsQedDqHwUSdUx8jWCm5r6Bv5gxCg0rWKcvaLF3B dbFOtI2ydN+soLOgXxkmfDvifCjqs8L96MP3OVsnVxShJl6IeaRTdJugfdPRxwIt bpzNNTRX8Eq1KpKT2+Q941Q= Received: (qmail 17951 invoked by alias); 21 Nov 2018 14:18:20 -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 17936 invoked by uid 89); 21 Nov 2018 14:18:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.2 spammy= 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; Wed, 21 Nov 2018 14:18:19 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D2DE8AE3E for ; Wed, 21 Nov 2018 14:18:16 +0000 (UTC) Date: Wed, 21 Nov 2018 15:18:16 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR88133 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 This fixes a bogus warning in bitmap.c by avoiding the problematic transform of cunrolli, thereby eliding the elt->bits[0] test for --disable-checking. Bootstrapped (with and without --disable-checking) and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-11-21 Richard Biener PR bootstrap/88133 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning. * Makefile.in (bitmap.o-warn): Remove again. Index: gcc/bitmap.c =================================================================== --- gcc/bitmap.c (revision 266340) +++ gcc/bitmap.c (working copy) @@ -1186,13 +1186,13 @@ bitmap_last_set_bit (const_bitmap a) elt = elt->next; bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS; - for (ix = BITMAP_ELEMENT_WORDS - 1; ix >= 0; ix--) + for (ix = BITMAP_ELEMENT_WORDS - 1; ix >= 1; ix--) { word = elt->bits[ix]; if (word) goto found_bit; } - gcc_unreachable (); + gcc_assert (elt->bits[ix] != 0); found_bit: bit_no += ix * BITMAP_WORD_BITS; #if GCC_VERSION >= 3004 Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 266340) +++ gcc/Makefile.in (working copy) @@ -221,7 +221,6 @@ libgcov-merge-tool.o-warn = -Wno-error gimple-match.o-warn = -Wno-unused generic-match.o-warn = -Wno-unused dfp.o-warn = -Wno-strict-aliasing -bitmap.o-warn = -Wno-error=array-bounds # PR 87926 # All warnings have to be shut off in stage1 if the compiler used then # isn't gcc; configure determines that. WARN_CFLAGS will be either