[Bug c++/63362] The c++11 triviality-traits need front-end help

ville.voutilainen at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 2 22:25:00 GMT 2014


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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #9 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Ouch. The test snippet is extracted from an attempt to implement
is_trivially_constructible.

#include <type_traits>

template <typename T, class... Args>
struct mytrait : public std::__and_<std::is_constructible<T, Args...>,
std::integral_constant<bool,
            __is_trivially_constructible(T, Args...)>>::type
{
}

trivial_trait.cpp:5:43: internal compiler error: tree check: expected class
‘type’, have ‘exceptional’ (tree_list) in strip_typedefs, at cp/tree.c:1204
    __is_trivially_constructible(T, Args...)>>::type
                                           ^
0xe02687 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
    ../../gcc/tree.c:9226
0x735d28 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
    ../../gcc/tree.h:2856
0x735d28 strip_typedefs(tree_node*)
    ../../gcc/cp/tree.c:1204
0x734c40 strip_typedefs_expr(tree_node*)
    ../../gcc/cp/tree.c:1396
0x5fe7d7 convert_template_argument
    ../../gcc/cp/pt.c:6658
0x5e125b coerce_template_parms
    ../../gcc/cp/pt.c:7080
0x5e92de lookup_template_class_1
    ../../gcc/cp/pt.c:7661
0x5e92de lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
    ../../gcc/cp/pt.c:7979
0x6ffd62 finish_template_type(tree_node*, tree_node*, int)
    ../../gcc/cp/semantics.c:2981
0x692bf9 cp_parser_template_id
    ../../gcc/cp/parser.c:13664
0x692f08 cp_parser_class_name
    ../../gcc/cp/parser.c:19491
0x68707a cp_parser_qualifying_entity
    ../../gcc/cp/parser.c:5571
0x68707a cp_parser_nested_name_specifier_opt
    ../../gcc/cp/parser.c:5296
0x69f3a0 cp_parser_simple_type_specifier
    ../../gcc/cp/parser.c:14871
0x67ae55 cp_parser_type_specifier
    ../../gcc/cp/parser.c:14617
0x67c0ab cp_parser_type_specifier_seq
    ../../gcc/cp/parser.c:18359
0x691362 cp_parser_type_id_1
    ../../gcc/cp/parser.c:18231
0x69145e cp_parser_template_type_arg
    ../../gcc/cp/parser.c:18281
0x691692 cp_parser_template_argument
    ../../gcc/cp/parser.c:14044
0x691692 cp_parser_template_argument_list
    ../../gcc/cp/parser.c:13954
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.


More information about the Gcc-bugs mailing list