Skip to content

build: eliminate uninitialized warnings from GCC12#22512

Merged
asmorkalov merged 1 commit intoopencv:3.4from
alalek:build_warning_gcc12_uninitialized
Sep 20, 2022
Merged

build: eliminate uninitialized warnings from GCC12#22512
asmorkalov merged 1 commit intoopencv:3.4from
alalek:build_warning_gcc12_uninitialized

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Sep 14, 2022

Warnings looks like:

In function ‘__m512i _mm512_cvtepi16_epi32(__m256i)’,
    inlined from ‘void cv::hal_AVX512_SKX::v_expand(const v_int16x32&, v_int32x16&, v_int32x16&)’ at /home/alalek/projects/opencv/dev/modules/core/include/opencv2/core/hal/intrin_avx512.hpp:2028:1,
    inlined from ‘bool cv::hal::opt_AVX512_SKX::{anonymous}::Integral_SIMD<unsigned char, double, double>::operator()(const uchar*, size_t, double*, size_t, double*, size_t, double*, size_t, int, int, int) const’ at /home/alalek/projects/opencv/dev/modules/imgproc/src/sumpixels.simd.hpp:854:29:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avx512fintrin.h:2243:52: warning: ‘__Y’ may be used uninitialized [-Wmaybe-uninitialized]
 2243 |   return (__m512i) __builtin_ia32_pmovsxwd512_mask ((__v16hi) __A,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
 2244 |                                                     (__v16si)
      |                                                     ~~~~~~~~~
 2245 |                                                     _mm512_undefined_epi32 (),
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 2246 |                                                     (__mmask16) -1);
      |                                                     ~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/12/include/avx512fintrin.h: In function ‘bool cv::hal::opt_AVX512_SKX::{anonymous}::Integral_SIMD<unsigned char, double, double>::operator()(const uchar*, size_t, double*, size_t, double*, size_t, double*, size_t, int, int, int) const’:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avx512fintrin.h:206:11: note: ‘__Y’ was declared here
  206 |   __m512i __Y = __Y;
      |           ^~~

In general we should not have any warnings from system headers at all.

Probably problem is related to this GCC 12.1 bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562

@asmorkalov asmorkalov self-assigned this Sep 20, 2022
@asmorkalov
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov asmorkalov merged commit f2ccce2 into opencv:3.4 Sep 20, 2022
@alalek alalek mentioned this pull request Oct 15, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants