From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129945 invoked by alias); 4 Jun 2015 11:26:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 129892 invoked by uid 48); 4 Jun 2015 11:26:16 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 Date: Thu, 04 Jun 2015 11:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00433.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #4 from Markus Trippelsdorf --- Here is a slightly longer testcase, that only ICEs with 5.1.1 and 6.0: trippels@gcc2-power8 view % cat zip.ii namespace std { template struct A { static constexpr _Tp value = 0; }; typedef A false_type; struct is_lvalue_reference : false_type {}; template _Tp declval(); template struct H : A {}; template struct enable_if { typedef int type; }; template struct conditional { typedef _Iftrue type; }; } namespace meta { template struct B; template using eval = typename T::type; template struct I : std::enable_if<1> {}; template struct I : std::conditional {}; template using if_ = eval>; template using if_c = eval>; template using and_c = std::H>; template struct B {}; template using index_sequence = B; } namespace adl_begin_end_detail { struct begin_fn; } using adl_begin_end_detail::begin_fn; template struct C; template struct static_const { static constexpr T value{}; }; template using Constructible = C; template using SemiRegular = C<>; template using function_type = decltype(std::declval()); template using iterator_reference_t = int; namespace adl_begin_end_detail { struct begin_fn { template = 0> auto impl(Rng rng, int) -> decltype(rng.begin()); template auto operator()(Rng rng) -> decltype(impl(rng, 0)); }; } auto begin = static_const::value; struct range_access { template static auto begin_cursor(Rng rng, int) -> decltype(rng.begin_cursor()); template static auto current(Cur) -> decltype(0); }; template struct basic_iterator { using reference = decltype(range_access::current(std::declval())); }; template using begin_cursor_t = decltype(range_access::begin_cursor(std::declval(), 0)); template using end_cursor_t = decltype(std::declval); template using facade_iterator_t = basic_iterator, end_cursor_t>; template struct iter_zip_with_view; struct indirect_zip_fn_; struct D { template > facade_iterator_t begin(); }; template struct F; template using semiregular_t = meta::if_, T, F>; struct { template auto impl(Fun fun, Tup, meta::index_sequence<>) -> decltype(fun()); template auto operator()(Fun fun, Tup) -> decltype(impl(fun, 0, {})); } tuple_apply; template struct common_tuple { template ::value>::type = 0> common_tuple(); template ()...>::value>::type> common_tuple(); }; template struct iter_zip_with_view : D { semiregular_t> fun_; struct G { auto current() -> decltype(tuple_apply(fun_, 0)); }; G begin_cursor(); }; struct indirect_zip_fn_ { template auto operator()() -> decltype(common_tuple...>{}); }; struct zip_view : iter_zip_with_view { } __trans_tmp_1; void check_equal() { auto rng = __trans_tmp_1; begin(rng); }