c++: Fix error-recovery with concepts.
authorJason Merrill <jason@redhat.com>
Tue, 4 Feb 2020 22:18:35 +0000 (17:18 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 4 Feb 2020 22:25:09 +0000 (17:25 -0500)
commit85409531ff032a008ebfbb715344648f15492dac
treeb921d2b26e88dd58a1501ccd1f25b266a0506e4e
parent0712ea6313bc44f9ae8feb235c1b02c92cdd0527
c++: Fix error-recovery with concepts.

Here, push_tinst_level refused to push into the scope of Foo::Foo
because it was triggered from the ill-formed function fun.  But we didn't
check the return value and tried to pop the un-pushed level.

PR c++/93551
* constraint.cc (satisfy_declaration_constraints): Check return
value of push_tinst_level.
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/testsuite/g++.dg/cpp2a/concepts-err1.C [new file with mode: 0644]