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  <domi...@lps.ens.fr>

        PR target/71017
        * config/i386/cpuid.h: Fix undefined behavior.

--- ../_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)

Is it OK for trunk/branches?

TIA

Dominique

Reply via email to