c++: ICE on invalid concept placeholder [PR94481].
authorJason Merrill <jason@redhat.com>
Tue, 7 Apr 2020 04:22:55 +0000 (00:22 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 7 Apr 2020 20:49:29 +0000 (16:49 -0400)
commit31449cf8e119bbe172a68689068591827472da5c
tree95d85f2965934a6c8f971f4f2d4fe43aa5af4cbf
parentc23c899aedf11069e992eed7358802b262d62f98
c++: ICE on invalid concept placeholder [PR94481].

Here the 'decltype' is missing '(auto)', so open_paren was NULL, and trying
to get its location is a SEGV.  Using matching_parens avoids that problem.

gcc/cp/ChangeLog
2020-04-07  Jason Merrill  <jason@redhat.com>

PR c++/94481
* parser.c (cp_parser_placeholder_type_specifier): Use
matching_parens.
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C [new file with mode: 0644]