https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97918
--- Comment #9 from Jan Engelhardt <jengelh at inai dot de> --- The new g++.dg/debug/localclass2.C test file you added is marked "target c++11", but it seems I can only cause the crash with -std=c++17 or later standards. Should the test file perhaps be amended?