[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 4 16:45:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly adjusted testcase that better matches what the original had:

template <typename T, typename U>
void bar (T &x, T &y, U u)
{
  u (x, y);
}

template <typename T>
void baz (T &x, T &y) noexcept (noexcept (x == y));

void
foo (int x, int y)
{
  bar (x, y, baz<int>);
}

The ICE is always because there is a deferred throw/noexcept spec when we
assert that it is not deferred.


More information about the Gcc-bugs mailing list