1 # DP: Revert the fix for PC c++/88419, causing PR c++/89906.
3 2019-03-08 Jason Merrill <jason@redhat.com>
5 PR c++/88419 - C++17 ICE with class template arg deduction.
6 * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
7 CLASS_PLACEHOLDER_TEMPLATE.
11 @@ -26002,10 +26002,8 @@
13 make_template_placeholder (tree tmpl)
15 - tree t = make_auto_1 (DECL_NAME (tmpl), false);
16 + tree t = make_auto_1 (DECL_NAME (tmpl), true);
17 CLASS_PLACEHOLDER_TEMPLATE (t) = tmpl;
18 - /* Our canonical type depends on the placeholder. */
19 - TYPE_CANONICAL (t) = canonical_type_parameter (t);
23 --- a/gcc/testsuite/g++.dg/cpp1z/class-deduction62.C
24 +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction62.C
27 -// { dg-do compile { target c++17 } }
29 -template<class> struct ref_view {
30 - template<class T> ref_view(T&&);
33 -template<class R> ref_view(R&) -> ref_view<R>;
36 - template<class R> auto operator()(R r) const
37 - noexcept(noexcept(ref_view{r}));
40 -template<class R> struct indirect_view {
45 - template<class R> auto operator()(R r) const
46 - noexcept(noexcept(indirect_view{r}));