This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81236] Crash when calling a template member function from generic lambda
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 24 Aug 2017 16:38:54 +0000
- Subject: [Bug c++/81236] Crash when calling a template member function from generic lambda
- Auto-submitted: auto-generated
- References: <bug-81236-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81236
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-24
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Guillaume Racicot from comment #0)
> This code is valid and compiles under clang (3.8.0)
It isn't valid; with make_crash<i> you're trying to use a function parameter as
a non-type template argument. A simplified version would be
template <int I> void f();
template <class T> constexpr void g(T t)
{
f<t>();
}
int main()
{
g(42);
}
which gcc and clang both properly reject.