public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings
@ 2022-05-16 10:42 christian.morales.vega at gmail dot com
  2022-05-16 10:56 ` [Bug libstdc++/105616] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: christian.morales.vega at gmail dot com @ 2022-05-16 10:42 UTC (permalink / raw)
  To: gcc-bugs

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++.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/105616] Using regex_replace throws "maybe-uninitialized" warnings
  2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
@ 2022-05-16 10:56 ` jakub at gcc dot gnu.org
  2022-07-11 14:58 ` christian.morales.vega at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-16 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Dup of PR105562 ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/105616] Using regex_replace throws "maybe-uninitialized" warnings
  2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: christian.morales.vega at gmail dot com @ 2022-07-11 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Cristian Morales Vega <christian.morales.vega at gmail dot com> ---
I don't think so.
Supposedly it was fixed 2 months ago in trunk
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562#c14). But in
https://godbolt.org/z/8a979Gha8 the warnings are still present (even if the
full compilation doesn't complete because it takes too long for compiler
explorer).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/105616] Using regex_replace throws "maybe-uninitialized" warnings with -fsanitize=address
  2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
  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 ` 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
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-27  4:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Most likely -fsanitize=address is confusing things. There are a few other bugs
which talk about -fsanitize=address and -Wuninitialized interactions too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/105616] Using regex_replace throws "maybe-uninitialized" warnings with -fsanitize=address
  2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-22 19:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bill.trost at harmonicinc dot com

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 107824 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/105616] Using regex_replace throws "maybe-uninitialized" warnings with -fsanitize=address
  2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
                   ` (3 preceding siblings ...)
  2022-11-22 19:09 ` redi at gcc dot gnu.org
@ 2023-12-04 16:26 ` jg at jguk dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jg at jguk dot org @ 2023-12-04 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jonny Grant <jg at jguk dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jg at jguk dot org

--- Comment #5 from Jonny Grant <jg at jguk dot org> ---
The godbolt link shows the issue on the trunk.

I see this in 13.2.0 myself.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-04 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 10:42 [Bug libstdc++/105616] New: Using regex_replace throws "maybe-uninitialized" warnings christian.morales.vega at gmail dot com
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

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).