public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
@ 2015-06-03 13:48 trippels at gcc dot gnu.org
2015-06-03 13:48 ` [Bug c++/66405] " trippels at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-03 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
Bug ID: 66405
Summary: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
Target Milestone: ---
% g++ -std=c++11 -c zip.ii
...
/home/trippels/range-v3/include/meta/meta.hpp:887:66: internal compiler error:
in tsubst, at cp/pt.c:12021
integer_sequence<bool, (Bools ||
true)...>>;
^
0x10162107 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:12021
0x10171293 tsubst_copy
../../gcc/gcc/cp/pt.c:13391
0x1015e0bb tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15756
0x1015e737 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:14789
0x101678c7 tsubst_expr
../../gcc/gcc/cp/pt.c:14424
0x1016bda7 gen_elem_of_pack_expansion_instantiation
../../gcc/gcc/cp/pt.c:9939
0x1016bda7 tsubst_pack_expansion
../../gcc/gcc/cp/pt.c:10142
0x10170343 tsubst_template_args
../../gcc/gcc/cp/pt.c:10242
0x1017028f tsubst_template_args
../../gcc/gcc/cp/pt.c:10260
0x101707d7 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:10475
0x101614af tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11935
0x101701ab tsubst_template_args
../../gcc/gcc/cp/pt.c:10278
0x101707d7 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:10475
0x101614af tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11935
0x1016a6d7 tsubst_decl
../../gcc/gcc/cp/pt.c:11365
0x10161733 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11856
0x10172fab instantiate_template_1
../../gcc/gcc/cp/pt.c:15991
0x10172fab instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:16041
0x101616d7 instantiate_alias_template
../../gcc/gcc/cp/pt.c:16071
0x101616d7 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11883
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
@ 2015-06-03 13:48 ` trippels at gcc dot gnu.org
2015-06-03 13:57 ` trippels at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-03 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 35692
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35692&action=edit
unreduced testcase
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
2015-06-03 13:48 ` [Bug c++/66405] " trippels at gcc dot gnu.org
@ 2015-06-03 13:57 ` trippels at gcc dot gnu.org
2015-06-03 14:09 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-03 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Creduce came up with:
template <typename> struct A;
template <bool> struct enable_if;
template <typename T, T> struct B;
template <bool... Bools> using and_c = A<B<bool, Bools || true...>>;
template <typename...> using Constructible = int;
template <typename... Ts> struct common_tuple {
template <
typename... Us,
typename enable_if<and_c<(int)Constructible<Ts, Us>()...>::value>::type>
common_tuple();
void foo();
};
template <> void common_tuple<>::foo(){};
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
2015-06-03 13:48 ` [Bug c++/66405] " trippels at gcc dot gnu.org
2015-06-03 13:57 ` trippels at gcc dot gnu.org
@ 2015-06-03 14:09 ` mpolacek at gcc dot gnu.org
2015-06-04 11:26 ` trippels at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-06-03 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-03
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |5.2
Ever confirmed|0 |1
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2015-06-03 14:09 ` mpolacek at gcc dot gnu.org
@ 2015-06-04 11:26 ` trippels at gcc dot gnu.org
2015-06-05 19:14 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-04 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
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 <typename _Tp> struct A { static constexpr _Tp value = 0; };
typedef A<bool> false_type;
struct is_lvalue_reference : false_type {};
template <typename _Tp> _Tp declval();
template <typename> struct H : A<bool> {};
template <bool> struct enable_if { typedef int type; };
template <typename _Iftrue> struct conditional { typedef _Iftrue type; };
}
namespace meta {
template <typename T, T...> struct B;
template <typename T> using eval = typename T::type;
template <typename...> struct I : std::enable_if<1> {};
template <typename If, typename Then, typename Else>
struct I<If, Then, Else> : std::conditional<Then> {};
template <typename... Args> using if_ = eval<I<Args...>>;
template <bool, typename> using if_c = eval<I<>>;
template <bool... Bools> using and_c = std::H<B<bool, Bools || true...>>;
template <typename T, T...> struct B {};
template <long...> using index_sequence = B<long>;
}
namespace adl_begin_end_detail {
struct begin_fn;
}
using adl_begin_end_detail::begin_fn;
template <typename...> struct C;
template <typename T> struct static_const { static constexpr T value{}; };
template <typename... Us> using Constructible = C<Us...>;
template <typename> using SemiRegular = C<>;
template <typename T> using function_type = decltype(std::declval<T>());
template <typename> using iterator_reference_t = int;
namespace adl_begin_end_detail {
struct begin_fn {
template <typename Rng, meta::if_c<std::is_lvalue_reference::value, int> = 0>
auto impl(Rng rng, int) -> decltype(rng.begin());
template <typename Rng> auto operator()(Rng rng) -> decltype(impl(rng, 0));
};
}
auto begin = static_const<begin_fn>::value;
struct range_access {
template <typename Rng>
static auto begin_cursor(Rng rng, int) -> decltype(rng.begin_cursor());
template <typename Cur> static auto current(Cur) -> decltype(0);
};
template <typename Cur, typename> struct basic_iterator {
using reference = decltype(range_access::current(std::declval<Cur>()));
};
template <typename Derived>
using begin_cursor_t =
decltype(range_access::begin_cursor(std::declval<Derived>(), 0));
template <typename Derived>
using end_cursor_t = decltype(std::declval<Derived>);
template <typename Derived>
using facade_iterator_t =
basic_iterator<begin_cursor_t<Derived>, end_cursor_t<Derived>>;
template <typename> struct iter_zip_with_view;
struct indirect_zip_fn_;
struct D {
template <typename D = iter_zip_with_view<indirect_zip_fn_>>
facade_iterator_t<D> begin();
};
template <typename> struct F;
template <typename T> using semiregular_t = meta::if_<SemiRegular<T>, T, F<T>>;
struct {
template <typename Fun, typename Tup>
auto impl(Fun fun, Tup, meta::index_sequence<>) -> decltype(fun());
template <typename Fun, typename Tup>
auto operator()(Fun fun, Tup) -> decltype(impl(fun, 0, {}));
} tuple_apply;
template <typename... Ts> struct common_tuple {
template <std::enable_if<meta::and_c<>::value>::type = 0> common_tuple();
template <typename... Us, typename std::enable_if<meta::and_c<
(int)Constructible<Ts, Us>()...>::value>::type>
common_tuple();
};
template <typename Fun> struct iter_zip_with_view : D {
semiregular_t<function_type<Fun>> fun_;
struct G {
auto current() -> decltype(tuple_apply(fun_, 0));
};
G begin_cursor();
};
struct indirect_zip_fn_ {
template <typename... Its>
auto operator()() -> decltype(common_tuple<iterator_reference_t<Its>...>{});
};
struct zip_view : iter_zip_with_view<int> {
} __trans_tmp_1;
void check_equal() {
auto rng = __trans_tmp_1;
begin(rng);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2015-06-04 11:26 ` trippels at gcc dot gnu.org
@ 2015-06-05 19:14 ` jason at gcc dot gnu.org
2015-06-05 19:14 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 5 19:14:02 2015
New Revision: 224163
URL: https://gcc.gnu.org/viewcvs?rev=224163&root=gcc&view=rev
Log:
PR c++/66405
* pt.c (argument_pack_element_is_expansion_p): Return 2 if
the expansion has extra args.
(use_pack_expansion_extra_args_p): Return true in that case.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-alias1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2015-06-05 19:14 ` jason at gcc dot gnu.org
@ 2015-06-05 19:14 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 5 19:13:56 2015
New Revision: 224162
URL: https://gcc.gnu.org/viewcvs?rev=224162&root=gcc&view=rev
Log:
PR c++/66405
* pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
dependent even if it has a type.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2015-06-05 19:18 ` jason at gcc dot gnu.org
@ 2015-06-05 19:18 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 5 19:17:24 2015
New Revision: 224164
URL: https://gcc.gnu.org/viewcvs?rev=224164&root=gcc&view=rev
Log:
PR c++/66405
* pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
dependent even if it has a type.
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2015-06-05 19:14 ` jason at gcc dot gnu.org
@ 2015-06-05 19:18 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jun 5 19:17:30 2015
New Revision: 224165
URL: https://gcc.gnu.org/viewcvs?rev=224165&root=gcc&view=rev
Log:
PR c++/66405
* pt.c (argument_pack_element_is_expansion_p): Return 2 if
the expansion has extra args.
(use_pack_expansion_extra_args_p): Return true in that case.
Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/variadic-alias1.C
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/66405] [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2015-06-05 19:18 ` jason at gcc dot gnu.org
@ 2015-06-05 19:18 ` jason at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-05 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66405
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 5.2.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-06-05 19:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-03 13:48 [Bug c++/66405] New: [5/6 Regression] ICE: in tsubst, at cp/pt.c:11984 trippels at gcc dot gnu.org
2015-06-03 13:48 ` [Bug c++/66405] " trippels at gcc dot gnu.org
2015-06-03 13:57 ` trippels at gcc dot gnu.org
2015-06-03 14:09 ` mpolacek at gcc dot gnu.org
2015-06-04 11:26 ` trippels at gcc dot gnu.org
2015-06-05 19:14 ` jason at gcc dot gnu.org
2015-06-05 19:14 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
2015-06-05 19:18 ` jason at gcc dot gnu.org
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).