[Bug c++/103341] [11/12 Regression] ICE type of variable instantiation constrained on template parameter

2022-01-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103341

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Patrick Palka :

https://gcc.gnu.org/g:e272cf95ba048fde60b21aee046c9ca9c9264425

commit r12-6919-ge272cf95ba048fde60b21aee046c9ca9c9264425
Author: Patrick Palka 
Date:   Fri Jan 28 08:18:28 2022 -0500

c++: var tmpl w/ dependent constrained auto type [PR103341]

When deducing the type of a variable template (or templated static data
member) with a constrained auto type, we might need its template
arguments for satisfaction since the constraint could depend on them.

PR c++/103341

gcc/cp/ChangeLog:

* decl.cc (cp_finish_decl): Pass the template arguments of a
variable template specialization or a templated static data
member to do_auto_deduction when the auto is constrained.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-class4.C: New test.
* g++.dg/cpp2a/concepts-var-templ2.C: New test.

[Bug c++/103341] [11/12 Regression] ICE type of variable instantiation constrained on template parameter

2022-01-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103341

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/103341] [11/12 Regression] ICE type of variable instantiation constrained on template parameter

2021-12-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103341

--- Comment #3 from Andrew Pinski  ---
Reduced with an extra testcase from PR 103706:
template concept C =  sizeof(T) == sizeof(int);
template inline constexpr C auto trait_v{1};
decltype(trait_v) t = 1;
template void g5() {
[]() -> C auto{ return T();  }();
}
template void g5();

[Bug c++/103341] [11/12 Regression] ICE type of variable instantiation constrained on template parameter

2021-12-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103341

Andrew Pinski  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #2 from Andrew Pinski  ---
*** Bug 103706 has been marked as a duplicate of this bug. ***