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.