https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479
--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 52106 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52106&action=edit reduced testcase Not even though it says PR 100129, this is the reduced testcase. just execute t.sh which does: gcc header.hh -std=c++20 -fmodules-ts gcc t.cc -std=c++20 -fmodules-ts -wrapper valgrind,--error-exitcode=1 And you will see the valgrind failures.