Re: [PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-27 Thread Andrew Sutton
> > + if (tmpl) > > + push_tinst_level (tmpl); > > Actually, why not pass 't' here? I thought it would matter if 't' was a non-template. Turns out it doesn't. Updated and committed.

Re: [PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-26 Thread Jason Merrill
On 11/18/19 10:18 AM, Andrew Sutton wrote: I forgot to mention a somewhat odd test included in the patch: concepts-recursive-sat3.C does not recurse. Code follows: template concept Fooable = requires(T t) { foo(t); }; template void foo(T t) { } void test() { foo(0); // { dg-error "unsatisfi

Re: [PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-26 Thread Jason Merrill
On 11/18/19 10:13 AM, Andrew Sutton wrote: This applies on top of the patch here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01034.html Wrap satisfaction with push/pop_tinst_level to force termination on recursion. + if (tmpl) + push_tinst_level (tmpl); Actually, why not pass

Re: [PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-26 Thread Jason Merrill
On 11/18/19 10:13 AM, Andrew Sutton wrote: This applies on top of the patch here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01034.html Wrap satisfaction with push/pop_tinst_level to force termination on recursion. Andrew Sutton OK.

Re: [PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-18 Thread Andrew Sutton
I forgot to mention a somewhat odd test included in the patch: concepts-recursive-sat3.C does not recurse. Code follows: template concept Fooable = requires(T t) { foo(t); }; template void foo(T t) { } void test() { foo(0); // { dg-error "unsatisfied constraints" } } It doesn't crash, but it

[PATCH] Prevent recursive satisfaction (PR c++/88395)

2019-11-18 Thread Andrew Sutton
This applies on top of the patch here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01034.html Wrap satisfaction with push/pop_tinst_level to force termination on recursion. Andrew Sutton 0001-Prevent-recursive-satisfaction-PR-c-88395.patch Description: Binary data