This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/57832] New: compiling sha-256 code (xz 5.0.5) generates false warnings when using -march=native on Atom CPU


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57832

            Bug ID: 57832
           Summary: compiling sha-256 code (xz 5.0.5) generates false
                    warnings when using -march=native on Atom CPU
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olivier.pis.langlois at transport dot alstom.com

Created attachment 30465
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30465&action=edit
intermediate file

When I compile check/sha256.c (from xz 5.0.5) without '-march=native' (should
be atom), compiler process the input file.

With '-march=native', it generates, IMO, false warnings.

lano1106@hpmini ~/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma $
gcc -v -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api
-I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz
-I../../src/liblzma/rangecoder -I../../src/liblzma/lzma
-I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common
-DTUKLIB_SYMBOL_PREFIX=lzma_ -D_FORTIFY_SOURCE=2 -pthread -fvisibility=hidden
-Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs
-Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith
-Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Werror
-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT
liblzma_la-sha256.lo -MD -MP -MF .deps/liblzma_la-sha256.Tpo -c check/sha256.c 
-fPIC -DPIC -o .libs/liblzma_la-sha256.o
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
Target: i686-pc-linux-gnu
Configured with: /build/gcc/src/gcc-4.8.1/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --disable-multilib --disable-libssp
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=gnu99' '-D' 'HAVE_CONFIG_H' '-I' '.' '-I'
'../..' '-I' '../../src/liblzma/api' '-I' '../../src/liblzma/common' '-I'
'../../src/liblzma/check' '-I' '../../src/liblzma/lz' '-I'
'../../src/liblzma/rangecoder' '-I' '../../src/liblzma/lzma' '-I'
'../../src/liblzma/delta' '-I' '../../src/liblzma/simple' '-I'
'../../src/common' '-D' 'TUKLIB_SYMBOL_PREFIX=lzma_' '-D' '_FORTIFY_SOURCE=2'
'-pthread' '-fvisibility=hidden' '-Wall' '-Wextra' '-Wvla' '-Wformat=2'
'-Winit-self' '-Wmissing-include-dirs' '-Wstrict-aliasing' '-Wfloat-equal'
'-Wundef' '-Wshadow' '-Wpointer-arith' '-Wbad-function-cast' '-Wwrite-strings'
'-Wlogical-op' '-Waggregate-return' '-Wstrict-prototypes'
'-Wold-style-definition' '-Wmissing-prototypes' '-Wmissing-declarations'
'-Wsuggest-attribute=noreturn' '-Wredundant-decls' '-Werror' '-march=native'
'-O2' '-pipe' '-fstack-protector' '--param' 'ssp-buffer-size=4' '-MT'
'liblzma_la-sha256.lo' '-MD' '-MP' '-MF' '.deps/liblzma_la-sha256.Tpo' '-c'
'-fPIC' '-D' 'PIC' '-o' '.libs/liblzma_la-sha256.o'
 /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/cc1 -quiet -v -I . -I ../.. -I
../../src/liblzma/api -I ../../src/liblzma/common -I ../../src/liblzma/check -I
../../src/liblzma/lz -I ../../src/liblzma/rangecoder -I ../../src/liblzma/lzma
-I ../../src/liblzma/delta -I ../../src/liblzma/simple -I ../../src/common -MD
.libs/liblzma_la-sha256.d -MF .deps/liblzma_la-sha256.Tpo -MP -MT
liblzma_la-sha256.lo -D_REENTRANT -D HAVE_CONFIG_H -D
TUKLIB_SYMBOL_PREFIX=lzma_ -D _FORTIFY_SOURCE=2 -D PIC check/sha256.c
-march=atom -mcx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm
-mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx
-mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd
-mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave
-mno-xsaveopt --param l1-cache-size=0 --param l1-cache-line-size=0 --param
l2-cache-size=512 -mtune=atom -quiet -dumpbase sha256.c -auxbase-strip
.libs/liblzma_la-sha256.o -O2 -Wall -Wextra -Wvla -Wformat=2 -Winit-self
-Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow
-Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op
-Waggregate-return -Wstrict-prototypes -Wold-style-definition
-Wmissing-prototypes -Wmissing-declarations -Wsuggest-attribute=noreturn
-Wredundant-decls -Werror -std=gnu99 -version -fvisibility=hidden
-fstack-protector -fPIC --param ssp-buffer-size=4 -o - |
 as -v -I . -I ../.. -I ../../src/liblzma/api -I ../../src/liblzma/common -I
../../src/liblzma/check -I ../../src/liblzma/lz -I ../../src/liblzma/rangecoder
-I ../../src/liblzma/lzma -I ../../src/liblzma/delta -I
../../src/liblzma/simple -I ../../src/common --32 -o .libs/liblzma_la-sha256.o
GNU assembler version 2.23.2 (i686-pc-linux-gnu) using BFD version (GNU
Binutils) 2.23.2
GNU C (GCC) version 4.8.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 ../..
 ../../src/liblzma/api
 ../../src/liblzma/common
 ../../src/liblzma/check
 ../../src/liblzma/lz
 ../../src/liblzma/rangecoder
 ../../src/liblzma/lzma
 ../../src/liblzma/delta
 ../../src/liblzma/simple
 ../../src/common
 /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.8.1/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.8.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2963cf20dad9f99b27bcc12dcdc7b43f
check/sha256.c: In function ÃprocessÃ:
check/sha256.c:85:11: error: ÃW[6]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
  uint32_t W[16];
           ^
check/sha256.c:85:11: error: ÃW[5]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[13]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[4]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[12]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[3]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[11]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[2]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[10]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[15]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[0]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[1]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[9]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
check/sha256.c:85:11: error: ÃW[14]Ã may be used uninitialized in this function
[-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
lano1106@hpmini ~/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma :( $
cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU N455   @ 1.66GHz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]