https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121832
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <[email protected]>: https://gcc.gnu.org/g:ff7d7898bb40d4bc72ad157d48eaa42fbe022512 commit r16-7220-gff7d7898bb40d4bc72ad157d48eaa42fbe022512 Author: Nathaniel Shead <[email protected]> Date: Fri Sep 12 23:26:20 2025 +1000 c++: Fix error recovery after export keyword [PR121832] When we enter cp_parser_explicit_template_declaration with the following tokens being 'template <>', we never parse a parameter list and so with -fconcepts we crash dereferencing a null pointer. This can currently only happen after a non-modules 'export' declaration, as all other paths check early for this case. PR c++/121832 gcc/cp/ChangeLog: * parser.cc (cp_parser_explicit_template_declaration): Check for null. gcc/testsuite/ChangeLog: * g++.dg/concepts/pr121832.C: New test. Signed-off-by: Nathaniel Shead <[email protected]>
