https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108214
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:553332c19a04ad0a6bbdd2aafc3499a1cb4dfa0c commit r13-5048-g553332c19a04ad0a6bbdd2aafc3499a1cb4dfa0c Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Jan 6 13:42:07 2023 +0000 libstdc++: Fix misuse of alloca in std::bitset [PR108214] The use of alloca in a constructor is wrong, because the memory is gone after the constructor returns, and will be overwritten by a subsequent function call. This didn't show up in testing because function inlining alters the stack usage. libstdc++-v3/ChangeLog: PR libstdc++/108214 * include/std/bitset (operator>>): Use alloca in the right scope, not in a constructor. * testsuite/20_util/bitset/io/input.cc: Check case from PR.