https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68475
Bug ID: 68475 Summary: ICE: in merge_exception_specifiers, at cp/typeck2.c:2115 with -fno-exceptions on invalid code Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Created attachment 36801 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36801&action=edit reduced testcase (from g++.dg/cpp0x/noexcept28.C) Compiler output: $ gcc testcase.C -fno-exceptions testcase.C:10:58: internal compiler error: in merge_exception_specifiers, at cp/typeck2.c:2115 X < T >::operator = (X &&) noexcept (traits < T >::bar ()) ^ 0x6990cb merge_exception_specifiers(tree_node*, tree_node*) /mnt/svn/gcc-trunk/gcc/cp/typeck2.c:2113 0x73a271 merge_types(tree_node*, tree_node*) /mnt/svn/gcc-trunk/gcc/cp/typeck.c:882 0x60d8a8 duplicate_decls(tree_node*, tree_node*, bool) /mnt/svn/gcc-trunk/gcc/cp/decl.c:2035 0x5a9095 grokfndecl /mnt/svn/gcc-trunk/gcc/cp/decl.c:8222 0x626323 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) /mnt/svn/gcc-trunk/gcc/cp/decl.c:11299 0x628c86 start_function(cp_decl_specifier_seq*, cp_declarator const*, tree_node*) /mnt/svn/gcc-trunk/gcc/cp/decl.c:14085 0x71d978 cp_parser_function_definition_from_specifiers_and_declarator /mnt/svn/gcc-trunk/gcc/cp/parser.c:24703 0x71d978 cp_parser_init_declarator /mnt/svn/gcc-trunk/gcc/cp/parser.c:17972 0x71f394 cp_parser_single_declaration /mnt/svn/gcc-trunk/gcc/cp/parser.c:25278 0x71f53b cp_parser_template_declaration_after_parameters /mnt/svn/gcc-trunk/gcc/cp/parser.c:24897 0x7200e4 cp_parser_explicit_template_declaration /mnt/svn/gcc-trunk/gcc/cp/parser.c:25132 0x7200e4 cp_parser_template_declaration_after_export /mnt/svn/gcc-trunk/gcc/cp/parser.c:25150 0x728ec1 cp_parser_declaration /mnt/svn/gcc-trunk/gcc/cp/parser.c:11708 0x7271ea cp_parser_declaration_seq_opt /mnt/svn/gcc-trunk/gcc/cp/parser.c:11630 0x727538 cp_parser_translation_unit /mnt/svn/gcc-trunk/gcc/cp/parser.c:4189 0x727538 c_parse_file() /mnt/svn/gcc-trunk/gcc/cp/parser.c:36803 0x881492 c_common_parse_file() /mnt/svn/gcc-trunk/gcc/c-family/c-opts.c:1064 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. $ gcc -v Using built-in specs. COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-230703-lto-fortran-checking-yes-rtl-df/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk//binary-230703-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl --without-isl Thread model: posix gcc version 6.0.0 20151121 (experimental) (GCC) Tested revisions: r230703 - ICE