public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "christian.morales.vega at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings
Date: Mon, 16 May 2022 10:42:56 +0000	[thread overview]
Message-ID: <bug-105616-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105616
           Summary: Using regex_replace throws "maybe-uninitialized"
                    warnings
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christian.morales.vega at gmail dot com
  Target Milestone: ---

As can be seen in https://godbolt.org/z/qK976bqzf

Building
--------------------
#include <iostream>
#include <iterator>
#include <regex>
#include <string>

int main()
{
   std::string text = "Quick brown fox";
   std::regex vowel_re("a|e|i|o|u");

   // write the results to an output iterator
   std::regex_replace(std::ostreambuf_iterator<char>(std::cout),
                      text.begin(), text.end(), vowel_re, "*");

   // construct a string holding the results
   std::cout << '\n' << std::regex_replace(text, vowel_re, "[$&]") << '\n';
}
--------------------
(taken from https://en.cppreference.com/w/cpp/regex/regex_replace)
with "-fsanitize=address -O1 -Wmaybe-uninitialized" creates a long list of
warnings

--------------------
In file included from
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/regex:48,
                 from <source>:3:
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:290:24:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
In file included from
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/regex:63:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:287:17:
note: '__tmp' declared here
  287 |         _StateT __tmp(_S_opcode_subexpr_end);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:290:24:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:287:17:
note: '__tmp' declared here
  287 |         _StateT __tmp(_S_opcode_subexpr_end);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:281:24:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:279:17:
note: '__tmp' declared here
  279 |         _StateT __tmp(_S_opcode_subexpr_begin);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:281:24:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:279:17:
note: '__tmp' declared here
  279 |         _StateT __tmp(_S_opcode_subexpr_begin);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_backref(std::size_t) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:173:29:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
In file included from
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:400:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:
In member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_backref(std::size_t) [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:171:15:
note: '__tmp' declared here
  171 |       _StateT __tmp(_S_opcode_backref);
      |               ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_backref(std::size_t) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:173:29:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:
In member function 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_backref(std::size_t) [with _TraitsT =
std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.tcc:171:15:
note: '__tmp' declared here
  171 |       _StateT __tmp(_S_opcode_backref);
      |               ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:189:15:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:189:15:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:199:17:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:199:17:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:208:15:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:208:15:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:246:19:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:246:19:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:264:42:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_repeat(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:263:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:264:42:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_quantifier() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:257:17:
note: '__tmp' declared here
  257 |         _StateT __tmp(_S_opcode_repeat);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_alt(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:251:24,
    inlined from 'void std::__detail::_Compiler<_TraitsT>::_M_disjunction()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:103:18:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'void std::__detail::_Compiler<_TraitsT>::_M_disjunction()
[with _TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:246:17:
note: '__tmp' declared here
  246 |         _StateT __tmp(_S_opcode_alternative);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_alt(std::__detail::_StateIdT,
std::__detail::_StateIdT, bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:251:24,
    inlined from 'void std::__detail::_Compiler<_TraitsT>::_M_disjunction()
[with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:103:18:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'void std::__detail::_Compiler<_TraitsT>::_M_disjunction()
[with _TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:246:17:
note: '__tmp' declared here
  246 |         _StateT __tmp(_S_opcode_alternative);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_word_bound(bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:309:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:153:16:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:307:17:
note: '__tmp' declared here
  307 |         _StateT __tmp(_S_opcode_word_boundary);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_word_bound(bool) [with _TraitsT =
std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:309:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:153:16:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:307:17:
note: '__tmp' declared here
  307 |         _StateT __tmp(_S_opcode_word_boundary);
      |                 ^~~~~
In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_lookahead(std::__detail::_StateIdT,
bool) [with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:318:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:164:8:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:405:42:
warning: '*(std::function<bool(char)>*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:315:17:
note: '__tmp' declared here
  315 |         _StateT __tmp(_S_opcode_subexpr_lookahead);
      |                 ^~~~~
In member function 'bool std::_Function_base::_M_empty() const',
    inlined from 'std::function<_Res(_ArgTypes ...)>::operator bool() const
[with _Res = bool; _ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:574:25,
    inlined from 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:407:6,
    inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_lookahead(std::__detail::_StateIdT,
bool) [with _TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:318:24,
    inlined from 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]' at
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_compiler.tcc:164:8:
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/std_function.h:247:37:
warning: '*(const std::_Function_base*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager'
may be used uninitialized [-Wmaybe-uninitialized]
  247 |     bool _M_empty() const { return !_M_manager; }
      |                                     ^~~~~~~~~~
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h: In
member function 'bool std::__detail::_Compiler<_TraitsT>::_M_assertion() [with
_TraitsT = std::__cxx11::regex_traits<char>]':
/opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/regex_automaton.h:315:17:
note: '__tmp' declared here
  315 |         _StateT __tmp(_S_opcode_subexpr_lookahead);
      |                 ^~~~~
--------------------

The same problem happens with Fedora 36 / gcc 12.1.1 and doesn't happen with
11.3.
Not sure if it's a problem with g++, ASAN or libstdc++.

             reply	other threads:[~2022-05-16 10:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 10:42 christian.morales.vega at gmail dot com [this message]
2022-05-16 10:56 ` [Bug libstdc++/105616] " jakub at gcc dot gnu.org
2022-07-11 14:58 ` christian.morales.vega at gmail dot com
2022-10-27  4:35 ` [Bug tree-optimization/105616] Using regex_replace throws "maybe-uninitialized" warnings with -fsanitize=address pinskia at gcc dot gnu.org
2022-11-22 19:09 ` redi at gcc dot gnu.org
2023-12-04 16:26 ` jg at jguk dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105616-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).