https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67161
Bug ID: 67161 Summary: [6 Regression] ICE with a static_assert using our internal __not/__or/__and traits Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ville.voutilainen at gmail dot com CC: jason at redhat dot com Target Milestone: --- Created attachment 36151 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36151&action=edit Preprocessed source The static_assert in my forthcoming patch to implement make_array/to_array ICEs when the front-end encounters (and fires) the static_assert in the implementation. The static_assert looks like this: static_assert(__or_< __not_<is_void<_Dest>>, __and_<__not_<__is_reference_wrapper<decay_t<_Types>>>...>> ::value, "make_array cannot be used without an explicit target type " "if any of the types given is a reference_wrapper"); g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4) compiles and fires the static_assert successfully, as did gcc 6 at least until July 13th, because at that time I was able to run my make_array tests successfully, and I haven't modified them since. Preprocessed source code attached. Pardon me for not being able to reduce it yet. Backtrace: In file included from neg.cc:21:0: Segmentation fault static_assert(__or_< ^ 0xc7e44f crash_signal ../../gcc/toplev.c:352 0xefd3f6 contains_struct_check(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3227 0xefd3f6 int_cst_value(tree_node const*) ../../gcc/tree.c:10982 0x6be2b4 get_non_default_template_args_count ../../gcc/cp/error.c:202 0x6c7fa1 dump_template_argument_list ../../gcc/cp/error.c:211 0x6c31ad dump_decl ../../gcc/cp/error.c:1215 0x6c9f0e dump_template_parms ../../gcc/cp/error.c:1799 0x6cc32c dump_typename ../../gcc/cp/error.c:597 0x6c9f0e dump_template_parms ../../gcc/cp/error.c:1799 0x6c1d2c dump_type_prefix ../../gcc/cp/error.c:811 0x6c0012 dump_function_decl ../../gcc/cp/error.c:1540 0x6ccbd2 decl_to_string ../../gcc/cp/error.c:2946 0x6ccbd2 cp_printer ../../gcc/cp/error.c:3527 0x136b3da pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.c:612 0x136bcd0 pp_format_verbatim(pretty_printer*, text_info*) ../../gcc/pretty-print.c:672 0x136bda4 pp_verbatim(pretty_printer*, char const*, ...) ../../gcc/pretty-print.c:873 0x6bdf8a print_instantiation_full_context ../../gcc/cp/error.c:3309 0x6bdf8a maybe_print_instantiation_context ../../gcc/cp/error.c:3453 0x6c8dd3 cp_diagnostic_starter ../../gcc/cp/error.c:3145 0x13688bf diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:916 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.