https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116369
--- Comment #1 from Piotr Nycz <piotrwn1 at gmail dot com> --- (In reply to Piotr Nycz from comment #0) > Starting from C++20 (C++23 too) and gcc14.1, with STL debug mode ON > (-std=c++20 -D_GLIBCXX_DEBUG) the following code starts producing SIGSEGV: > > #include <vector> > > const std::vector<int>& a{}; > int main() { > (void)a.begin(); > } > > The obvious workaround, changing to "const std::vector<int> a{};" works. > Also the problem is not visible with local vector, only for globals. > And only visible in GLIBC debug mode. > Not also visible in clang - so maybe this is the gcc compiler issue. > > Compiler Explorer link: https://godbolt.org/z/PKnbavGe6 proper link: https://godbolt.org/z/1EjrY8vaM