From patchwork Sat Jan 7 13:14:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Dominique_d=27Humi=C3=A8res?= X-Patchwork-Id: 712263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3twhhs1JY1z9sCG for ; Sun, 8 Jan 2017 00:14:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LVrA6FXS"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; q=dns; s=default; b=g6EcJWO6X7iW5LKjI3PJ chvaPDjtWfzIPzXpBFgwVx8K3fKWgWqcO2LztlEWreX68dwjmTIjUu1edBU+CJY1 ZTea/y0P3t6AmQpC4iPvwekVfy+PzwEZtuu1n21eq8Ke0YXWcWQUz+3OPMqbQ3Wy oFrRiX1jH9NSAhSp0tQqGtk= 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 :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; s=default; bh=bFD9bigmZo2IJj9r1EqafH/vqg g=; b=LVrA6FXScBnRB9u4itqcwOmb8Oh/k8le+04aRFE1laBLEkAAKTZYs+Ue8P I5+h1lCSh6dq9HKcG38YtfThPS1R5mnB8EaVfshtut1Cic0olyDUwC46+wKx3pNR 0WXB5a7CuAobCOn1X43JrRHbMPYW2SVbywyHxyM9bSy4d2bqU= Received: (qmail 47819 invoked by alias); 7 Jan 2017 13:14:28 -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 47803 invoked by uid 89); 7 Jan 2017 13:14:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=tia, dominiqlpsensfr, sk:dominiq, dominiq@lps.ens.fr X-Spam-User: qpsmtpd, 2 recipients X-HELO: nef2.ens.fr Received: from nef2.ens.fr (HELO nef2.ens.fr) (129.199.96.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Jan 2017 13:14:17 +0000 Received: from mailhost.lps.ens.fr (tournesol.lps.ens.fr [129.199.120.1]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v07DEEdq083044 ; Sat, 7 Jan 2017 14:14:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 2E438133; Sat, 7 Jan 2017 14:14:14 +0100 (CET) Received: from mailhost.lps.ens.fr ([127.0.0.1]) by localhost (tournesol.lps.ens.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1jvsI2wABGD1; Sat, 7 Jan 2017 14:14:14 +0100 (CET) Received: from [192.168.1.10] (log78-1-82-242-47-10.fbx.proxad.net [82.242.47.10]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id E45CD119; Sat, 7 Jan 2017 14:14:13 +0100 (CET) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: [Patch] PR71017 - libgcc/config/i386/cpuinfo.c:346:17: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Message-Id: <105CF83D-DD59-411F-8D4B-3166E45FC89A@lps.ens.fr> Date: Sat, 7 Jan 2017 14:14:18 +0100 Cc: kyukhin@gcc.gnu.org To: GCC-Patches-ML The following patch fixes errors of the kind libgcc/config/i386/cpuinfo.c:260:17: runtime error: left shift of 1 by 31 places cannot be represented in type ‘int' 2017-01-07 Dominique d'Humieres PR target/71017 * config/i386/cpuid.h: Fix undefined behavior. Is it OK for trunk/branches? TIA Dominique --- ../_clean/gcc/config/i386/cpuid.h 2017-01-01 17:39:04.000000000 +0100 +++ gcc/config/i386/cpuid.h 2017-01-05 15:22:31.000000000 +0100 @@ -91,7 +91,7 @@ #define bit_AVX512CD (1 << 28) #define bit_SHA (1 << 29) #define bit_AVX512BW (1 << 30) -#define bit_AVX512VL (1 << 31) +#define bit_AVX512VL (1u << 31) /* %ecx */ #define bit_PREFETCHWT1 (1 << 0)