https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95818

--- Comment #5 from Ferruh YIGIT <ferruh.yigit at intel dot com> ---
Got it, 'iavf_ethdev.i' attached.

I am able to reproduce with command [1] and got the output [2] using .i file.

[1]
/usr/local/gcc-latest/bin/gcc -m64 -pthread -march=native -O3 -Wall -Werror
-Wno-strict-aliasing -v -save-temps -o iavf_ethdev.o -x cpp-output
iavf_ethdev.i


[2]
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-latest/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-latest/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-latest/configure --prefix=/usr/local/gcc-latest :
(reconfigured) ../gcc-latest/configure --prefix=/usr/local/gcc-latest
--enable-languages=c,c++,fortran,lto,objc --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200621 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-m64' '-pthread' '-march=native' '-O3' '-Wall' '-Werror'
'-Wno-strict-aliasing' '-v' '-save-temps' '-o' 'iavf_ethdev.o' '-dumpdir'
'iavf_ethdev.o-'
 /usr/local/gcc-latest/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/cc1
-fpreprocessed iavf_ethdev.i -march=skylake-avx512 -mmmx -mno-3dnow -msse
-msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul
-mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2
-mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt
-mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave
-mxsaveopt -mavx512f -mno-avx512er -mavx512cd -mno-avx512pf -mno-prefetchwt1
-mclflushopt -mxsavec -mxsaves -mavx512dq -mavx512bw -mavx512vl -mno-avx512ifma
-mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mclwb -mno-mwaitx
-mno-clzero -mpku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2
-mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg
-mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote
-mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect -mno-serialize
-mno-tsxldtrk --param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=33792 -mtune=skylake-avx512 -quiet -dumpdir iavf_ethdev.o-
-dumpbase iavf_ethdev.i -dumpbase-ext .i -m64 -O3 -Wall -Werror
-Wno-strict-aliasing -version -o iavf_ethdev.o-iavf_ethdev.s
GNU C17 (GCC) version 11.0.0 20200621 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 11.0.0 20200621 (experimental), GMP version
6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C17 (GCC) version 11.0.0 20200621 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 11.0.0 20200621 (experimental), GMP version
6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 6a7f176d54144e44e3ed475e12ec1e06
.../net/iavf/iavf_ethdev.c: In function ‘iavf_dev_link_update’:
.../net/iavf/iavf_ethdev.c:641:6: error: ‘new_link’ is used uninitialized
[-Werror=uninitialized]
  641 |  if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  642 |     *(uint64_t *)&dev->data->dev_link,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  643 |     *(uint64_t *)&new_link) == 0)
      |     ~~~~~~~~~~~~~~~~~~~~~~~
.../net/iavf/iavf_ethdev.c:596:22: note: ‘new_link’ declared here
  596 |  struct rte_eth_link new_link;
      |                      ^~~~~~~~
cc1: all warnings being treated as errors

Reply via email to