fraunhoferhhi/vvdec

gcc 12.1.0: Werror in IntraPred_avx2.cpp

1480c1 opened this issue · 2 comments

Snippet of the error

FAILED: source/Lib/vvdec/CMakeFiles/vvdec.dir/__/CommonLib/x86/avx2/IntraPred_avx2.cpp.obj
ccache D:\media-autobuild_suite\msys64\mingw64\bin\ccache.exe  g++ -DVVDEC_SOURCE -D_WIN32_WINNT=0x0600 -DUSE_AVX2 -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../../../include -ID:/media-autobuild_suite/build/vvdec-git/build-64bit -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/SYSTEM -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/. -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/.. -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../DecoderLib -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../CommonLib -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../CommonLib/x86 -ID:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../libmd5 -isystem D:/media-autobuild_suite/build/vvdec-git/source/Lib/vvdec/../../../thirdparty -mthreads -mtune=generic -O2 -pipe -DTARGET_SIMD_X86 -O3 -DNDEBUG -msse4.1 -Wall -Werror -Wno-unused-function -Wno-sign-compare -fdiagnostics-show-option -Wno-ignored-attributes -std=gnu++14 -mavx2 -MD -MT source/Lib/vvdec/CMakeFiles/vvdec.dir/__/CommonLib/x86/avx2/IntraPred_avx2.cpp.obj -MF source\Lib\vvdec\CMakeFiles\vvdec.dir\__\CommonLib\x86\avx2\IntraPred_avx2.cpp.obj.d -o source/Lib/vvdec/CMakeFiles/vvdec.dir/__/CommonLib/x86/avx2/IntraPred_avx2.cpp.obj -c D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/avx2/IntraPred_avx2.cpp
In file included from D:/media-autobuild_suite/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/immintrin.h:47,
                 from D:/media-autobuild_suite/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/x86intrin.h:32,
                 from D:/media-autobuild_suite/msys64/mingw64/include/intrin.h:69,
                 from D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/CommonDef.h:71,
                 from D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/IntraPredX86.h:47,
                 from D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/avx2/IntraPred_avx2.cpp:43:
In function '__m256i _mm256_mulhi_epi16(__m256i, __m256i)',
    inlined from 'void vvdec::IntraPredSampleFilter_SIMD(Pel*, ptrdiff_t, PelBuf&, uint32_t, const ClpRng&) [with X86_VEXT vext = vvdec::AVX2; int W = 16]' at D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/IntraPredX86.h:490:41:
D:/media-autobuild_suite/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/avx2intrin.h:548:44: error: 'wl16start' may be used uninitialized [-Werror=maybe-uninitialized]
  548 |   return (__m256i)__builtin_ia32_pmulhw256 ((__v16hi)__A, (__v16hi)__B);
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/IntraPredX86.h: In function 'void vvdec::IntraPredSampleFilter_SIMD(Pel*, ptrdiff_t, PelBuf&, uint32_t, const ClpRng&) [with X86_VEXT vext = vvdec::AVX2; int W = 16]':
D:/media-autobuild_suite/build/vvdec-git/source/Lib/CommonLib/x86/IntraPredX86.h:449:18: note: 'wl16start' was declared here
  449 |     __m256i wl16,wl16start;
      |                  ^~~~~~~~~
cc1plus.exe: all warnings being treated as errors

Windows 11, msys2's mingw-w64 gcc 12.1.0

Thanks for reporting. I pushed our internal state (including gcc-12 internal CI), let us know if this is fixed. Regretfully no access to Win11, and not really familar with msys2, so cannot test myself.

Hi, I can confirm #96 indeed fixed my issues and compilation went without errors, thanks