This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63584] [4.8/4.9 Regression] ICE in strip_typedefs, at cp/tree.c:1326
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Oct 2014 11:41:53 +0000
- Subject: [Bug c++/63584] [4.8/4.9 Regression] ICE in strip_typedefs, at cp/tree.c:1326
- Auto-submitted: auto-generated
- References: <bug-63584-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63584
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-10-18
CC| |trippels at gcc dot gnu.org
Known to work| |5.0
Target Milestone|--- |4.8.5
Summary|ICE in strip_typedefs, at |[4.8/4.9 Regression] ICE in
|cp/tree.c:1326 |strip_typedefs, at
| |cp/tree.c:1326
Ever confirmed|0 |1
Known to fail| |4.8.3, 4.9.1
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
~ % cat preprocessed_repro.ii
namespace std
{
template <typename _Tp, _Tp __v> struct A
{
static constexpr _Tp value = __v;
};
typedef A<bool, false> false_type;
template <typename> void declval ();
struct __add_lvalue_reference_helper
{
typedef int type;
};
int make_tuple ();
template <bool, typename, typename> struct __lazy_conditional;
template <typename T, typename F> struct __lazy_conditional<false, T, F>
{
using type = typename F::type;
};
template <class Executor> struct B
{
using execution_category = typename Executor::execution_category;
using shape_type = struct tuple_of_references_t;
template <class>
struct C : __lazy_conditional<false_type::value, tuple_of_references_t,
__add_lvalue_reference_helper>
{
};
template <class T> using shared_param_type = typename C<T>::type;
};
template <class, class T>
auto __make_tuple_if_not_nested (T) -> decltype (make_tuple ());
template <class Executor1, class Executor2> class D
{
using outer_executor_type = Executor1;
using inner_executor_type = Executor2;
using outer_traits = B<outer_executor_type>;
using inner_traits = B<inner_executor_type>;
using inner_execution_category = typename inner_traits::execution_category;
using outer_index_type = typename outer_traits::shape_type;
using inner_shape_type = typename inner_traits::shape_type;
public:
using shape_type
= decltype (__make_tuple_if_not_nested<inner_execution_category> (
declval<inner_shape_type>));
template <class, class> struct inner_lambda_gcc49_workaround
{
};
template <class Function, class Tuple>
void
bulk_async (Function, shape_type, Tuple shared_arg_tuple)
{
auto outer_shared_arg (shared_arg_tuple);
using outer_shared_ref_type =
typename outer_traits::template shared_param_type<decltype (
outer_shared_arg)>;
[]
{
inner_lambda_gcc49_workaround<outer_index_type, outer_shared_ref_type>{};
};
}
};
class F
{
public:
using execution_category = int;
};
}
main ()
{
std::D<std::F, std::F> ex2;
ex2.bulk_async ([]
{
},
std::make_tuple (), std::make_tuple);
}
~ % g++ -c -O0 -std=c++11 preprocessed_repro.ii
preprocessed_repro.ii: In instantiation of 'std::D<Executor1,
Executor2>::bulk_async(Function, std::D<Executor1, Executor2>::shape_type,
Tuple)::<lambda()> [with Function = main()::<lambda()>; Tuple = int (*)();
Executor1 = std::F; Executor2 = std::F]':
preprocessed_repro.ii:57:6: required from 'struct std::D<Executor1,
Executor2>::bulk_async(Function, std::D<Executor1, Executor2>::shape_type,
Tuple) [with Function = main()::<lambda()>; Tuple = int (*)(); Executor1 =
std::F; Executor2 = std::F; std::D<Executor1, Executor2>::shape_type = int;
std::D<Executor1, Executor2>::inner_execution_category = int; std::D<Executor1,
Executor2>::inner_shape_type = std::tuple_of_references_t]::<lambda()>'
preprocessed_repro.ii:57:5: required from 'void std::D<Executor1,
Executor2>::bulk_async(Function, std::D<Executor1, Executor2>::shape_type,
Tuple) [with Function = main()::<lambda()>; Tuple = int (*)(); Executor1 =
std::F; Executor2 = std::F; std::D<Executor1, Executor2>::shape_type = int;
std::D<Executor1, Executor2>::inner_execution_category = int; std::D<Executor1,
Executor2>::inner_shape_type = std::tuple_of_references_t]'
preprocessed_repro.ii:75:54: required from here
preprocessed_repro.ii:59:7: internal compiler error: in strip_typedefs, at
cp/tree.c:1326
inner_lambda_gcc49_workaround<outer_index_type,
outer_shared_ref_type>{};
^
0x6118b7 strip_typedefs(tree_node*)
../../gcc-4.9.1-src/gcc/cp/tree.c:1326
0x558e4c canonicalize_type_argument
../../gcc-4.9.1-src/gcc/cp/pt.c:6349
0x5672e0 coerce_template_parms
../../gcc-4.9.1-src/gcc/cp/pt.c:7002
0x56ba4a lookup_template_class_1
../../gcc-4.9.1-src/gcc/cp/pt.c:7551
0x56ba4a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc-4.9.1-src/gcc/cp/pt.c:7886
0x56dbe7 tsubst_aggr_type
../../gcc-4.9.1-src/gcc/cp/pt.c:10196
0x568493 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc-4.9.1-src/gcc/cp/pt.c:11604
0x5612f6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-4.9.1-src/gcc/cp/pt.c:15075
0x5656ff tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:14016
0x5647af tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:13432
0x5656cd tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:13623
0x5656cd tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:13623
0x564402 instantiate_decl(tree_node*, int, bool)
../../gcc-4.9.1-src/gcc/cp/pt.c:19922
0x579d11 instantiate_class_template_1
../../gcc-4.9.1-src/gcc/cp/pt.c:9367
0x579d11 instantiate_class_template(tree_node*)
../../gcc-4.9.1-src/gcc/cp/pt.c:9435
0x5cfffd complete_type(tree_node*)
../../gcc-4.9.1-src/gcc/cp/typeck.c:134
0x560db6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-4.9.1-src/gcc/cp/pt.c:15284
0x5656ff tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:14016
0x5647af tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:13432
0x564fd4 tsubst_expr
../../gcc-4.9.1-src/gcc/cp/pt.c:13418
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.