public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356
Date: Sun, 23 Aug 2015 10:09:00 -0000	[thread overview]
Message-ID: <bug-67164-4-2ENqKsY9fl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67164-4@http.gcc.gnu.org/bugzilla/>

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here's another testcase: 

namespace std {
template <typename _Tp> struct A { static constexpr _Tp value = 0; };
template <bool, typename, typename> struct conditional;
template <typename...> struct B;
template <typename _B1, typename _B2>
struct B<_B1, _B2> : conditional<1, _B1, _B2> {};
template <typename...> struct C;
template <typename _B1, typename _B2>
struct C<_B1, _B2> : conditional<1, _B2, _B1> {};
template <typename> struct D;
template <typename _Tp> struct I : B<A<bool>, D<_Tp>>::type {};
template <typename _Tp> _Tp declval();
struct F {
  template <typename _Tp, typename _Arg,
            typename = decltype(_Tp(declval<_Arg>()))>
  static A<bool> __test(int);
};
template <typename _Tp, typename _Arg> struct J : F {
  decltype(__test<_Tp, _Arg>(0)) type;
};
template <typename _Tp, typename _Arg> struct K : C<int, J<_Tp, _Arg>> {};
template <typename _Tp, typename _Arg>
struct L : conditional<I<_Tp>::value, int, K<_Tp, _Arg>> {};
template <typename _Tp, typename _Arg>
struct __is_direct_constructible : L<_Tp, _Arg>::type {};
template <typename...> struct G;
template <typename _Tp, typename _Arg>
struct G<_Tp, _Arg> : __is_direct_constructible<_Tp, _Arg> {};
template <typename _Tp, typename... _Args>
struct is_constructible : G<_Tp, _Args...>::type {};
template <bool> struct enable_if;
template <bool, typename _Iftrue, typename> struct conditional {
  typedef _Iftrue type;
};
template <typename _Iftrue, typename _Iffalse>
struct conditional<false, _Iftrue, _Iffalse> {
  typedef _Iffalse type;
};
}
namespace detail {
template <bool> struct fast_and;
template <typename... Xn> struct closure {
  template <typename... Yn,
            typename = std::enable_if<
                fast_and<std::is_constructible<Xn, Yn>::value...>::value>>
  closure(Yn...);
  template <typename... Yn> closure(closure<Yn...>);
};
}
template <typename> struct make_impl;
template <typename Datatype> struct H {
  template <typename... X> decltype(auto) operator()(X... x) {
    return make_impl<Datatype>::apply(x...);
  }
};
template <typename Datatype> H<Datatype> make;
struct Tuple;
template <typename... Xs> struct M : detail::closure<Xs...> {
  using detail::closure<Xs...>::closure;
};
template <> struct make_impl<Tuple> {
  template <typename... Xs> static M<Xs...> apply(Xs...);
};
namespace test {
struct {
  template <typename... Xs> decltype(auto) operator()(Xs... xs) {
    auto storage = make<Tuple>(xs...);
    return storage;
  }
} seq;
}
int main() { test::seq(test::seq()); }


  reply	other threads:[~2015-08-23 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09  9:08 [Bug c++/67164] New: [6 Regression] " trippels at gcc dot gnu.org
2015-08-23 10:09 ` trippels at gcc dot gnu.org [this message]
2015-08-27 19:53 ` [Bug c++/67164] " ldionne.2 at gmail dot com
2015-08-28  4:33 ` trippels at gcc dot gnu.org
2021-10-01  9:48 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-67164-4-2ENqKsY9fl@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).