Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-49861

GCC 13.2.1 (GTS) on RHEL 8.10 raises false warning during build.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.10
    • gcc-toolset-13-gcc
    • None
    • Moderate
    • rhel-sst-pt-gcc
    • ssg_platform_tools
    • 5
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • None

      1) What were you trying to do that didn't work?

      = GCC 13.2.1 (GTS) on RHEL 8.10 raises false warning during build. The issue didn´t happen on GCC 12.3.0, but after GCC v12.4.0 update it stated happing on GCC 12 as well.

      2) Please provide the package NVR for which bug is seen:
      = GCC 13.2.1 (GTS)
      GCC v12.4.0
      RHEL 8.10

      3) How reproducible:
      = Every time

      4) Steps to reproduce

      1. Install GCC 13.2.1 (GTS)
      1. Use GCC 13.2 as default compiler

        scl enable gcc-toolset-13 bash
      1. Compile the attached source code test.cpp

        gcc -O3 test.cpp -std=c++17 -Wall -Werror

      5) Expected results
      = It should run without any false warning.

      6) Actual results

      ===========
      bash-4.4$ gcc -O3 test.cpp -std=c++17 -Wall -Werror
      In file included from /opt/rh/gcc-toolset-13/root/usr/include/c++/13/vector:62,
      from test.cpp:2:
      In static member function 'static Up* std::copy_move<_IsMove, true, std::random_access_iterator_tag>::_copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long unsigned int; _Up = long unsigned int; bool _IsMove = false]',
      inlined from 'OI std::_copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_algobase.h:506:30,
      inlined from 'OI std::_copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_algobase.h:533:42,
      inlined from 'OI std::_copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_algobase.h:540:31,
      inlined from '_OI std::copy(_II, _II, _OI) [with _II = long unsigned int*; _OI = long unsigned int*]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_algobase.h:633:7,
      inlined from 'std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc = std::allocator<bool>]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_bvector.h:1306:28,
      inlined from 'void std::vector<bool, _Alloc>::_M_reallocate(size_type) [with _Alloc = std::allocator<bool>]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/vector.tcc:851:40,
      inlined from 'void std::vector<bool, _Alloc>::reserve(size_type) [with _Alloc = std::allocator<bool>]' at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_bvector.h:1094:17,
      inlined from 'Testing::Testing()' at test.cpp:17:18:
      /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_algobase.h:437:30: error: 'void* __builtin_memmove(void*, const void*, long unsigned int)' forming offset 8 is out of the bounds [0, 8] [-Werror=array-bounds=]
      437 | {}builtin_memmove({_}_result, __first, sizeof(_Tp) * _Num);

      ~~~~~~~~~~~~~~~{}^{}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1plus: all warnings being treated as errors
      ===============

       

        1. test.cpp
          0.4 kB
          Vikramsingh Patil

              mpolacek@redhat.com Marek Polacek
              rhn-support-vikpatil Vikramsingh Patil
              Marek Polacek Marek Polacek
              Vaclav Kadlcik Vaclav Kadlcik
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: