[Bug c++/87513] [8/9 Regression] ICE in write_expression, at cp/mangle.c:3050

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 21 15:37:00 GMT 2018


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly adjusted testcase:
template <int N> struct A { static constexpr int c = N; };
template <typename> struct B;
template <typename> struct C;
template <typename T, typename U> struct C<T U::*> : A<B<T>::c> {};
template <typename T, typename... U> struct B<T (U...)> : A<true> {};
template <typename> class D;
struct E { typedef int l; };
template <bool, bool, typename...> struct F;
template <typename T, typename U, typename... V> struct F<false, true, T, U,
V...> : E {};
template <typename T, typename... U> struct G : F<A<false>::c, C<T>::c, U...>
{};
template <typename T, typename... U> struct D<T (U...)> : G<T, U...> {};
struct H { H (const char *); };
struct I { template <long> void foo (); };
struct J { template <long t> auto bar (H) -> typename D<decltype (&I::foo<t>)
(I, H)>::l; };
void
foo ()
{
  J j;
  j.bar<0> ("");
}


More information about the Gcc-bugs mailing list