[Bug c++/94523] [10 Regression] error: 'constexpr' evaluation depth exceeds maximum of 512 (use '-fconstexpr-depth=' to increase the maximum) since r10-7490-g76f09260b7eccd6c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94523 Volker Reichelt changed: What|Removed |Added CC||reichelt at gcc dot gnu.org --- Comment #4 from Volker Reichelt --- Here's a simpler testcase without variadic templates and template alias: === struct A { char c; constexpr A(int) : c() {} }; template struct B { static constexpr auto X = A(N); }; constexpr A a = B<0>::X; ===
[Bug c++/94523] [10 Regression] error: 'constexpr' evaluation depth exceeds maximum of 512 (use '-fconstexpr-depth=' to increase the maximum) since r10-7490-g76f09260b7eccd6c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94523 --- Comment #5 from Volker Reichelt --- Btw, larger testcases also fail with -std=c++2a, so it's not restricted to -std=c++14
[Bug c++/94523] [10 Regression] error: 'constexpr' evaluation depth exceeds maximum of 512 (use '-fconstexpr-depth=' to increase the maximum) since r10-7490-g76f09260b7eccd6c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94523 --- Comment #6 from Volker Reichelt --- Please ignore my previous comment, it really only fails with -std=c++14 or -std=c++11 .
[Bug c++/94799] [8/9/10 Regression] Calling a member template function fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94799 Volker Reichelt changed: What|Removed |Added CC||reichelt at gcc dot gnu.org --- Comment #9 from Volker Reichelt --- Hi Marek, your fix unfortunately breaks the following valid code (reduced from pybind11): === template struct A { typedef int type; operator int(); }; template using B = A; template typename B::type foo(B b) { return b.operator typename B::type(); } void bar() { foo(A()); } === bug.cc: In instantiation of 'typename B::type foo(B) [with T = int; typename B::type = int; B = A; B = A]': bug.cc:16:15: required from here bug.cc:11:36: error: no type named 'B' in 'struct A' 11 | return b.operator typename B::type(); | ~~^~~~
[Bug c++/94799] [8/9/10 Regression] Calling a member template function fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94799 --- Comment #11 from Volker Reichelt --- Hi Marek, any news on this one? It's three months now... Or should I file a new bug for the regression on trunk?
[Bug c++/58500] New: Crash with auto as function parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58500 Bug ID: 58500 Summary: Crash with auto as function parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (valid) testcase crashes when compiled with "-std=gnu++1y": = struct A {}; void foo(auto (A::*)()); = bug.cc:3:22: internal compiler error: in add_implicit_template_parms, at cp/parser.c:29007 void foo(auto (A::*)()); ^ 0x647b5a add_implicit_template_parms ../../gcc/gcc/cp/parser.c:29007 0x647b5a cp_parser_parameter_declaration_list ../../gcc/gcc/cp/parser.c:18052 0x647d56 cp_parser_parameter_declaration_clause ../../gcc/gcc/cp/parser.c:17867 0x6428d4 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:16819 0x6428d4 cp_parser_declarator ../../gcc/gcc/cp/parser.c:16690 0x649699 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16258 0x64a34f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c1b0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ce cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f2d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x655806 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x655806 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768184 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58501] New: [4.7/4.8/4.9 regression] [c++0x] Crash with brace-enclosed initializer as default parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58501 Bug ID: 58501 Summary: [4.7/4.8/4.9 regression] [c++0x] Crash with brace-enclosed initializer as default parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=gnu++0x") triggers an ICE since GCC 4.7.0: struct A { ~A(); }; int foo(A = {}); int i = foo(); bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:8:13: internal compiler error: in create_tmp_var, at gimplify.c:438 int i = foo(); ^ 0x95b833 create_tmp_var(tree_node*, char const*) ../../gcc/gcc/gimplify.c:438 0x95d10c create_tmp_from_val ../../gcc/gcc/gimplify.c:521 0x95d10c lookup_tmp_var ../../gcc/gcc/gimplify.c:543 0x95d10c internal_get_tmp_var ../../gcc/gcc/gimplify.c:587 0x95dace gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8153 0x966eb9 gimplify_call_expr ../../gcc/gcc/gimplify.c:2635 0x95ef88 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7293 0x96a00a gimplify_modify_expr ../../gcc/gcc/gimplify.c:4875 0x95e25b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7322 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95eeaf gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5475 0x95eeaf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7659 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95f30b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x95f30b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7711 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x965d65 gimplify_cond_expr ../../gcc/gcc/gimplify.c:3315 0x95e292 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7278 0x9620d6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x965d65 gimplify_cond_expr ../../gcc/gcc/gimplify.c:3315 Please submit a full bug report, [etc.]
[Bug c++/58501] [4.7/4.8/4.9 regression] [c++0x] Crash with brace-enclosed initializer as default parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58501 Volker Reichelt changed: What|Removed |Added Known to work|4.6.4 | --- Comment #1 from Volker Reichelt --- Before GCC 4.7.0 the code was wrongly rejected.
[Bug lto/58502] New: ICE with attribute(target) and -flto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58502 Bug ID: 58502 Summary: ICE with attribute(target) and -flto Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.8.0 when compiled with "g++ -flto" int foo(); int foo() __attribute__((target("default"))); int foo() __attribute__((target("arch=core2"))); int bar() { return foo(); } bug.cc: In function 'foo() [clone .resolver]': bug.cc:8:1: internal compiler error: Segmentation fault } ^ 0xae93df crash_signal ../../gcc/gcc/toplev.c:335 0xa092c1 contains_struct_check ../../gcc/gcc/tree.h:2717 0xa092c1 tree_is_indexable ../../gcc/gcc/lto-streamer-out.c:131 0xa0f10f lto_output_tree(output_block*, tree_node*, bool, bool) ../../gcc/gcc/lto-streamer-out.c:1298 0xa0faf7 output_function ../../gcc/gcc/lto-streamer-out.c:1771 0xa0faf7 lto_output ../../gcc/gcc/lto-streamer-out.c:1997 0xa45230 ipa_write_summaries_2 ../../gcc/gcc/passes.c:2283 0xa462a9 ipa_write_summaries_1 ../../gcc/gcc/passes.c:2314 0xa462a9 ipa_write_summaries() ../../gcc/gcc/passes.c:2371 0x7fcfa4 ipa_passes ../../gcc/gcc/cgraphunit.c:2019 0x7fcfa4 compile() ../../gcc/gcc/cgraphunit.c:2115 0x7fd229 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2269 0x6112b0 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4360 Please submit a full bug report, [etc.] The code compiles fine if I use the C front-end.
[Bug lto/58502] ICE with attribute(target) and -flto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58502 --- Comment #1 from Volker Reichelt --- Well, the above code snippet only fails on trunk (GCC 4.9.0), but the testcase below fails since GCC 4.8.0: int foo(); int foo() __attribute__((target("default"))); int foo() __attribute__((target("arch=core2"))); int i = foo();
[Bug c++/58503] New: ICE with invalid range in range-based for-loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58503 Bug ID: 58503 Summary: ICE with invalid range in range-based for-loop Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.7.0: === template void foo() { for (auto i : 0) {} } === bug.cc: In function 'void foo()': bug.cc:3:17: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive] for (auto i : 0) {} ^ bug.cc:3:17: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) bug.cc:3:17: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive] bug.cc:3:17: internal compiler error: Segmentation fault 0xae93df crash_signal ../../gcc/gcc/toplev.c:335 0xcd77b0 strip_array_types(tree_node*) ../../gcc/gcc/tree.c:7815 0x65eba8 cp_type_quals(tree_node const*) ../../gcc/gcc/cp/typeck.c:8745 0x6cb5e4 cv_unqualified(tree_node*) ../../gcc/gcc/cp/tree.c:1144 0x62c8d0 cp_parser_perform_range_for_lookup ../../gcc/gcc/cp/parser.c:10176 0x6369c4 do_range_for_auto_deduction ../../gcc/gcc/cp/parser.c:9962 0x6369c4 cp_parser_range_for ../../gcc/gcc/cp/parser.c:9915 0x6369c4 cp_parser_for ../../gcc/gcc/cp/parser.c:9848 0x6369c4 cp_parser_iteration_statement ../../gcc/gcc/cp/parser.c:10295 0x6369c4 cp_parser_statement ../../gcc/gcc/cp/parser.c:9175 0x636dfe cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x636f46 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x648343 cp_parser_function_body ../../gcc/gcc/cp/parser.c:18313 0x648343 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18349 0x64937f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22333 0x64a099 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22254 0x64a099 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 0x64a994 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22647 0x64d560 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22449 0x655301 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10728 Please submit a full bug report, [etc.] When the "-fpermissive" option is added, there is no error (only warnings) before the ICE. The code is wrongly accepted by GCC 4.6.x.
[Bug c++/58504] New: ICE with type trait as default template parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58504 Bug ID: 58504 Summary: ICE with type trait as default template parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.6.0: = template struct A {}; A<> a; = bug.cc:3:3: internal compiler error: in tsubst_copy, at cp/pt.c:12809 A<> a; ^ 0x5b2723 tsubst_copy ../../gcc/gcc/cp/pt.c:12809 0x591061 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:14738 0x59a4e2 tsubst_expr ../../gcc/gcc/cp/pt.c:13628 0x5a755d tsubst_template_arg ../../gcc/gcc/cp/pt.c:9235 0x5a3449 coerce_template_parms ../../gcc/gcc/cp/pt.c:6802 0x5abc6a lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7398 0x5abc6a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7695 0x6ad202 finish_template_type(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:2856 0x6456c0 cp_parser_template_id ../../gcc/gcc/cp/parser.c:13218 0x6458d2 cp_parser_class_name ../../gcc/gcc/cp/parser.c:18746 0x63b5ef cp_parser_qualifying_entity ../../gcc/gcc/cp/parser.c:5448 0x63b5ef cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:5173 0x6462b7 cp_parser_constructor_declarator_p ../../gcc/gcc/cp/parser.c:22076 0x6462b7 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11313 0x64a1a9 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10918 0x64c1b0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ce cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f2d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x655806 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x655806 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 Please submit a full bug report, [etc.]
[Bug c++/51219] [4.6/4.7/4.8/4.9 regression] ICE with empty bit-fields
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51219 Volker Reichelt changed: What|Removed |Added Summary|ICE with designated |[4.6/4.7/4.8/4.9 |initializers|regression] ICE with empty ||bit-fields --- Comment #4 from Volker Reichelt --- The designated initializer isn't the problem. The empty bit-field seems to be the issue, as the following testcase shows (which crashes since GCC 4.4.0): === struct A { int i; int : 8; }; void foo() { A a = { 0 }; } ===
[Bug c++/58510] New: [4.9 regression] [c++0x] ICE with multiple non-static data initializations in union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58510 Bug ID: 58510 Summary: [4.9 regression] [c++0x] ICE with multiple non-static data initializations in union Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE on trunk: void foo() { union { int i = 0; char c = 0; }; } bug.cc: In function 'void foo()': bug.cc:4:3: error: multiple fields in union 'foo()::' initialized { ^ bug.cc: In constructor 'constexpr foo()()': bug.cc:4:3: error: initializations for multiple members of 'foo()::' bug.cc: In function 'void foo()': bug.cc:7:4: note: synthesized method 'constexpr foo()()' first required here }; ^ bug.cc:7:4: internal compiler error: in complete_ctor_at_level_p, at expr.c:5650 0x89a301 complete_ctor_at_level_p(tree_node const*, long, tree_node const*) ../../gcc/gcc/expr.c:5650 0x89a68e categorize_ctor_elements_1 ../../gcc/gcc/expr.c:5602 0x9684b6 gimplify_init_constructor ../../gcc/gcc/gimplify.c:3966 0x96993e gimplify_modify_expr_rhs ../../gcc/gcc/gimplify.c:4518 0x969cad gimplify_modify_expr ../../gcc/gcc/gimplify.c:4834 0x95e07b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7322 0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95f987 gimplify_and_add ../../gcc/gcc/gimplify.c:329 0x95f987 gimplify_decl_expr ../../gcc/gcc/gimplify.c:1472 0x95f987 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7489 0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x95eccf gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5475 0x95eccf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7659 0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x962bb1 gimplify_bind_expr ../../gcc/gcc/gimplify.c:1213 0x95e73f gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7493 0x961ef6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5699 0x963541 gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.c:8356 0x9639f6 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.c:8488 0x7fa9d7 analyze_function ../../gcc/gcc/cgraphunit.c:636 Please submit a full bug report, [etc.]
[Bug c++/58511] New: [c++0x] ICE using static const member variable in constexpr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58511 Bug ID: 58511 Summary: [c++0x] ICE using static const member variable in constexpr Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.8.0 (when inheriting constructors were introduced): struct A { constexpr A(int, int = i) {} static const int i; }; struct B : A { using A::A; }; constexpr B b(0); bug.cc:12:16: error: 'constexpr B::B(int)' called in a constant expression constexpr B b(0); ^ bug.cc:9:12: note: 'constexpr B::B(int)' is not usable as a constexpr function because: using A::A; ^ bug.cc:9:12: internal compiler error: in synthesized_method_walk, at cp/method.c:1218 0x675548 synthesized_method_walk ../../gcc-4.8.0/gcc/cp/method.c:1217 0x679692 explain_implicit_non_constexpr(tree_node*) ../../gcc-4.8.0/gcc/cp/method.c:1481 0x69f68b explain_invalid_constexpr_fn(tree_node*) ../../gcc-4.8.0/gcc/cp/semantics.c:6379 0x69faf6 cxx_eval_call_expression ../../gcc-4.8.0/gcc/cp/semantics.c:6751 0x6a1142 cxx_eval_constant_expression ../../gcc-4.8.0/gcc/cp/semantics.c:7814 0x6a14a9 cxx_eval_constant_expression ../../gcc-4.8.0/gcc/cp/semantics.c:7835 0x6a4426 cxx_eval_outermost_constant_expr ../../gcc-4.8.0/gcc/cp/semantics.c:8115 0x5bd69d store_init_value(tree_node*, tree_node*, vec**, int) ../../gcc-4.8.0/gcc/cp/typeck2.c:722 0x540b40 check_initializer ../../gcc-4.8.0/gcc/cp/decl.c:5711 0x5537b5 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc-4.8.0/gcc/cp/decl.c:6328 0x62afeb cp_parser_init_declarator ../../gcc-4.8.0/gcc/cp/parser.c:16038 0x62b85e cp_parser_simple_declaration ../../gcc-4.8.0/gcc/cp/parser.c:10567 0x62d630 cp_parser_block_declaration ../../gcc-4.8.0/gcc/cp/parser.c:10448 0x6361fb cp_parser_declaration ../../gcc-4.8.0/gcc/cp/parser.c:10345 0x634ecd cp_parser_declaration_seq_opt ../../gcc-4.8.0/gcc/cp/parser.c:10231 0x636772 cp_parser_translation_unit ../../gcc-4.8.0/gcc/cp/parser.c:3807 0x636772 c_parse_file() ../../gcc-4.8.0/gcc/cp/parser.c:28186 0x73e504 c_common_parse_file() ../../gcc-4.8.0/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58516] New: ICE with __transaction_atomic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58516 Bug ID: 58516 Summary: ICE with __transaction_atomic Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippet (compiled with "-std=c++0x -fgnu-tm") triggers an ICE since GCC 4.7.0 (when transactional memory was introduced): = void foo() { __transaction_atomic noexcept(false) {} } = bug.cc: In function 'void foo()': bug.cc:3:41: internal compiler error: tree check: expected class 'expression', have 'exceptional' (statement_list) in finish_transaction_stmt, at cp/semantics.c:5202 __transaction_atomic noexcept(false) {} ^ 0xcd2399 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9258 0x6b576b expr_check ../../gcc/gcc/tree.h:2773 0x6b576b finish_transaction_stmt(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/semantics.c:5202 0x635842 cp_parser_transaction ../../gcc/gcc/cp/parser.c:28482 0x635842 cp_parser_statement ../../gcc/gcc/cp/parser.c:9205 0x636dde cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x636f26 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x648323 cp_parser_function_body ../../gcc/gcc/cp/parser.c:18313 0x648323 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18349 0x64935f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22333 0x64a079 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22254 0x64a079 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 0x64a32f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768164 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58518] New: [4.8/4.9 regression] ICE template specialization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58518 Bug ID: 58518 Summary: [4.8/4.9 regression] ICE template specialization Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.8.0: template struct A { template struct B {}; template struct B {}; }; A::B<0, 0> b; bug.cc:7:17: internal compiler error: in tsubst, at cp/pt.c:11473 A::B<0, 0> b; ^ 0x5a63d5 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11473 0x5a92a2 convert_template_argument ../../gcc/gcc/cp/pt.c:6424 0x5a3135 coerce_template_parms ../../gcc/gcc/cp/pt.c:6827 0x5bf864 get_class_bindings ../../gcc/gcc/cp/pt.c:18177 0x5c0420 most_specialized_class ../../gcc/gcc/cp/pt.c:18398 0x5d0eb0 instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:8687 0x5d0eb0 instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9216 0x65cdcb complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:132 0x54da66 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4670 0x577851 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4633 0x649a5a cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16447 0x64a32f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768164 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] A little longer testcase triggers an ICE in a different function: template struct A { typedef typename T::X U; template struct B {}; template struct B {}; }; struct C { typedef int X; }; A::B<0, 0> b; bug.cc:14:15: internal compiler error: in dependent_type_p, at cp/pt.c:19969 A::B<0, 0> b; ^ 0x588d28 dependent_type_p(tree_node*) ../../gcc/gcc/cp/pt.c:19969 0x589504 dependent_scope_p(tree_node*) ../../gcc/gcc/cp/pt.c:2 0x54aed7 make_typename_type(tree_node*, tree_node*, tag_types, int) ../../gcc/gcc/cp/decl.c:3331 0x5a5781 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11914 0x5a92a2 convert_template_argument ../../gcc/gcc/cp/pt.c:6424 0x5a3135 coerce_template_parms ../../gcc/gcc/cp/pt.c:6827 0x5bf864 get_class_bindings ../../gcc/gcc/cp/pt.c:18177 0x5c0420 most_specialized_class ../../gcc/gcc/cp/pt.c:18398 0x5d0eb0 instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:8687 0x5d0eb0 instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9216 0x65cdcb complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:132 0x54da66 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4670 0x577851 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4633 0x649a5a cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16447 0x64a32f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 Please submit a full bug report, [etc.]
[Bug middle-end/51009] New: [4.7 Regression] ICE in verify_gimple_stmt
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51009 Bug #: 51009 Summary: [4.7 Regression] ICE in verify_gimple_stmt Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: reich...@gcc.gnu.org The following code snippet triggers an ICE on trunk: === struct A { ~A(); }; struct B { A a; B(const A& = A()); }; struct C { B b1, b2; }; C c = {}; === bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:17:9: internal compiler error: in verify_gimple_stmt, at tree-cfg.c:4188 Please submit a full bug report, [etc.]
[Bug middle-end/51009] [4.7 Regression] ICE in verify_gimple_stmt
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51009 Volker Reichelt changed: What|Removed |Added Target Milestone|--- |4.7.0
[Bug c++/51029] New: [4.7 Regression] ICE with -std=c++0x
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51029 Bug #: 51029 Summary: [4.7 Regression] ICE with -std=c++0x Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: reich...@gcc.gnu.org Compiling the following valid code snippet with "-std=c++0x" crashes on trunk (it works without the flag): struct A { void foo(); }; struct B : virtual A { template B() { foo(); } }; bug.cc: In constructor 'B::B()': bug.cc:10:10: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
[Bug c++/51029] [4.7 Regression] ICE with -std=c++0x
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51029 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-valid-code Target Milestone|--- |4.7.0
[Bug c++/58533] New: [c++1y] ICE with auto in function pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58533 Bug ID: 58533 Summary: [c++1y] ICE with auto in function pointer Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=gnu++1y") triggers an ICE on trunk (4.9.0 20130922): = void foo() { void (*fp)(auto); } = bug.cc: In function 'void foo()': bug.cc:3:18: error: template declaration of 'void (* fp)(__GenT0)' void (*fp)(auto); ^ bug.cc: At global scope: bug.cc:4:1: internal compiler error: in pop_binding, at cp/name-lookup.c:372 } ^ 0x6f246a pop_binding(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:372 0x549577 poplevel(int, int, int) ../../gcc/gcc/cp/decl.c:736 0x584488 end_template_decl() ../../gcc/gcc/cp/pt.c:3786 0x624dcb finish_fully_implicit_template ../../gcc/gcc/cp/parser.c:29032 0x6493a8 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22350 0x64a079 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22254 0x64a079 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 0x64a32f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768164 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58534] New: [c++1y] ICE with auto in template function parameters
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58534 Bug ID: 58534 Summary: [c++1y] ICE with auto in template function parameters Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (valid, I think) code snippet (compiled with "-std=c++1y") triggers an ICE on trunk (4.9.0 20130922): == template void foo(const auto&) {} template void foo(const auto&, T...) {} == bug.cc:3:60: internal compiler error: same canonical type node for different types const __GenT0& and const __GenT0& template void foo(const auto&, T...) {} ^ 0x6617f1 comptypes ../../gcc/gcc/cp/typeck.c:1405 0x664dc3 compparms(tree_node const*, tree_node const*) ../../gcc/gcc/cp/typeck.c:1504 0x56bd6d duplicate_decls(tree_node*, tree_node*, bool) ../../gcc/gcc/cp/decl.c:1515 0x6f8476 push_overloaded_decl_1 ../../gcc/gcc/cp/name-lookup.c:2352 0x6f8476 push_overloaded_decl ../../gcc/gcc/cp/name-lookup.c:2447 0x6f9def pushdecl_maybe_friend_1 ../../gcc/gcc/cp/name-lookup.c:898 0x6f9def pushdecl_maybe_friend(tree_node*, bool) ../../gcc/gcc/cp/name-lookup.c:1264 0x6fbb37 pushdecl_with_scope_1 ../../gcc/gcc/cp/name-lookup.c:2251 0x6fbbfd pushdecl_with_scope(tree_node*, cp_binding_level*, bool) ../../gcc/gcc/cp/name-lookup.c:2265 0x6fbcaf pushdecl_namespace_level(tree_node*, bool) ../../gcc/gcc/cp/name-lookup.c:3826 0x5c2897 push_template_decl_real(tree_node*, bool) ../../gcc/gcc/cp/pt.c:4867 0x55d210 start_preparsed_function(tree_node*, tree_node*, int) ../../gcc/gcc/cp/decl.c:13117 0x5771b6 start_function(cp_decl_specifier_seq*, cp_declarator const*, tree_node*) ../../gcc/gcc/cp/decl.c:13433 0x649ee7 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22217 0x649ee7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 0x64a974 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22647 0x64d540 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22449 0x6552e1 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10728 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 Please submit a full bug report, [etc.]
[Bug c++/58535] New: [4.8/4.9 Regression] ICE with virtual template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58535 Bug ID: 58535 Summary: [4.8/4.9 Regression] ICE with virtual template function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE since GCC 4.8.0: == struct A { template virtual void foo(); }; == bug.cc:3:17: error: templates may not be 'virtual' template virtual void foo(); ^ bug.cc:3:35: internal compiler error: in check_member_template, at cp/decl2.c:510 template virtual void foo(); ^ 0x605d1b check_member_template(tree_node*) ../../gcc/gcc/cp/decl2.c:509 0x57f77f finish_member_template_decl(tree_node*) ../../gcc/gcc/cp/pt.c:290 0x64d574 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22459 0x62d222 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:19698 0x62e236 cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19625 0x62e236 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18880 0x630b90 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19096 0x630b90 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14080 0x6461ad cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x64a189 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10918 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768164 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] A c++1y variant crashes (on trunk) without an error message before the ICE: == struct A { virtual void foo(auto); }; ==
[Bug c++/58536] New: [c++1y] ICE with auto in constructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58536 Bug ID: 58536 Summary: [c++1y] ICE with auto in constructor Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (valid, I think) code snippet (compiled with "-std=gnu++1y") triggers an ICE on trunk (4.9.0 20130922): struct A { A(auto); }; A::A(auto) {} bug.cc:6:10: internal compiler error: in poplevel_class, at cp/name-lookup.c:2928 A::A(auto) {} ^ 0x6f4834 poplevel_class() ../../gcc/gcc/cp/name-lookup.c:2928 0x5e9c88 popclass() ../../gcc/gcc/cp/class.c:7033 0x5ea10a pop_nested_class() ../../gcc/gcc/cp/class.c:7179 0x642cf9 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:17213 0x642cf9 cp_parser_declarator ../../gcc/gcc/cp/parser.c:16690 0x649679 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16258 0x64a32f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x64c190 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6551ae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x653f0d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x6557e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x6557e6 c_parse_file() ../../gcc/gcc/cp/parser.c:28893 0x768164 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58548] New: ICE with local struct in function with auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58548 Bug ID: 58548 Summary: ICE with local struct in function with auto parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippet triggers an ICE on trunk (4.9.0 20130926) when compiled with "-std=gnu++1y": === void foo(auto) { struct A { int i; }; } === bug.cc: In function 'void foo()': bug.cc:3:18: error: data member 'i' cannot be a member template struct A { int i; }; ^ neu40.cc:6:18: internal compiler error: in poplevel, at cp/decl.c:560 0x554850 poplevel(int, int, int) ../../gcc/gcc/cp/decl.c:560 0x58e568 end_template_decl() ../../gcc/gcc/cp/pt.c:3786 0x62ed7b finish_fully_implicit_template ../../gcc/gcc/cp/parser.c:29040 0x637ad1 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20086 0x6381ee cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19630 0x6381ee cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18885 0x63ab90 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19101 0x63ab90 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14080 0x6500a9 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x654139 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10918 0x656140 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x657230 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10514 0x63fad7 cp_parser_statement ../../gcc/gcc/cp/parser.c:9274 0x640dde cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x640f26 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x6522db cp_parser_function_body ../../gcc/gcc/cp/parser.c:18318 0x6522db cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18354 0x65331f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22338 0x654027 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22259 0x654027 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16347 Please submit a full bug report, [etc.] Furthermore, IMHO the error message is bogus and the code should be accepted.
[Bug c++/58549] New: [c++1y] ICE with local function in function with auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549 Bug ID: 58549 Summary: [c++1y] ICE with local function in function with auto parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=gnu++1y") triggers an ICE on trunk (4.9.0 20130926): === void foo(auto) { void bar(); } === bug.cc: In function 'void foo()': bug.cc:4:1: internal compiler error: in finish_function, at cp/decl.c:13852 } ^ 0x56b38f finish_function(int) ../../gcc/gcc/cp/decl.c:13852 0x65333d cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22344 0x654027 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22259 0x654027 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16347 0x6542df cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x656140 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65f16e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65decd cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65f7b6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65f7b6 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 0x772e94 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58550] New: [4.9 Regression] ][c++0x] ICE with auto in function return type and lto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58550 Bug ID: 58550 Summary: [4.9 Regression] ][c++0x] ICE with auto in function return type and lto Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (probably invalid) code snippet triggers an ICE on trunk (4.9.0 20130926) when compiled with "std=c++0x -flto": auto foo(); auto fp = foo; bug.cc:1:10: warning: 'foo' function uses 'auto' type specifier without trailing return type [enabled by default] auto foo(); ^ bug.cc:3:14: internal compiler error: tree code 'template_type_parm' is not supported in LTO streams auto fp = foo; ^ 0xa17696 DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1244 0xa165c9 DFS_write_tree_body ../../gcc/gcc/lto-streamer-out.c:461 0xa165c9 DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1152 0xa165c9 DFS_write_tree_body ../../gcc/gcc/lto-streamer-out.c:461 0xa165c9 DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1152 0xa18907 lto_output_tree(output_block*, tree_node*, bool, bool) ../../gcc/gcc/lto-streamer-out.c:1334 0xa12cfc write_global_stream ../../gcc/gcc/lto-streamer-out.c:2084 0xa1a990 lto_output_decl_state_streams ../../gcc/gcc/lto-streamer-out.c:2128 0xa1a990 produce_asm_for_decls ../../gcc/gcc/lto-streamer-out.c:2413 0xa4e720 ipa_write_summaries_2 ../../gcc/gcc/passes.c:2283 0xa4f799 ipa_write_summaries_1 ../../gcc/gcc/passes.c:2314 0xa4f799 ipa_write_summaries() ../../gcc/gcc/passes.c:2371 0x807c5b ipa_passes ../../gcc/gcc/cgraphunit.c:2019 0x807c5b compile() ../../gcc/gcc/cgraphunit.c:2115 0x807ee9 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2269 0x61b2b0 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4360 Please submit a full bug report, [etc.] In GCC 4.8.1 the code was rejected: bug.cc:1:10: warning: 'foo' function uses 'auto' type specifier without trailing return type [enabled by default] auto foo(); ^ bug.cc:3:11: error: use of 'auto foo()' before deduction of 'auto' auto fp = foo;
[Bug c++/58549] [4.9 Regression] [c++1y] ICE with local function in function with auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549 --- Comment #2 from Volker Reichelt --- To me they look like a (syntactically simpler) alternative to template parameters. They were introduced here: > 2013-09-16 Adam Butcher > > * cp-tree.h (type_uses_auto_or_concept): Declare. > (is_auto_or_concept): Declare. > * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with > -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions. [...]
[Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58560 Bug ID: 58560 Summary: [4.7/4.8/4.9 Regression] ICE with auto in typedef Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.7.0: typedef auto T; void foo() { T(); } bug.cc:1:14: error: typedef declared 'auto' typedef auto T; ^ bug.cc: In function 'void foo()': bug.cc:3:16: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_value_init_noctor, at cp/init.c:377 void foo() { T(); } ^ 0xcdbad9 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9225 0x6940e6 tree_class_check ../../gcc/gcc/tree.h:2731 0x6940e6 build_value_init_noctor(tree_node*, int) ../../gcc/gcc/cp/init.c:377 0x5e4cf1 build_functional_cast(tree_node*, tree_node*, int) ../../gcc/gcc/cp/typeck2.c:1817 0x649859 cp_parser_functional_cast ../../gcc/gcc/cp/parser.c:22734 0x64429d cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5741 0x646acd cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x6476af cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x647b6f cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x6499d3 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x64a1ce cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x64a1ce cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9429 0x63faf7 cp_parser_statement ../../gcc/gcc/cp/parser.c:9280 0x640dde cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x640f26 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x6522db cp_parser_function_body ../../gcc/gcc/cp/parser.c:18318 0x6522db cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18354 0x65331f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22338 0x654027 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22259 0x654027 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16347 Please submit a full bug report, [etc.]
[Bug c++/58561] New: [c++0x] ICE using declaration of function with auto in return type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58561 Bug ID: 58561 Summary: [c++0x] ICE using declaration of function with auto in return type Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (valid?) code snippet (compiled with "-std=c++0x -g") triggers an ICE since GCC 4.8.0: = auto foo(); namespace N { using ::foo; } = bug.cc:1:10: warning: 'foo' function uses 'auto' type specifier without trailing return type [enabled by default] auto foo(); ^ bug.cc:5:11: internal compiler error: in is_base_type, at dwarf2out.c:10146 using ::foo; ^ 0x86a0f6 is_base_type ../../gcc/gcc/dwarf2out.c:10146 0x86a0f6 modified_type_die ../../gcc/gcc/dwarf2out.c:10337 0x86b58a add_type_attribute ../../gcc/gcc/dwarf2out.c:16702 0x861250 gen_subprogram_die ../../gcc/gcc/dwarf2out.c:17895 0x86a42a force_decl_die ../../gcc/gcc/dwarf2out.c:19955 0x87b0e2 dwarf2out_imported_module_or_decl_1 ../../gcc/gcc/dwarf2out.c:20398 0x70bcf6 cp_emit_debug_info_for_using(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:6206 0x70be53 do_toplevel_using_decl(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:3939 0x655204 cp_parser_using_declaration ../../gcc/gcc/cp/parser.c:15771 0x6559ec cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10848 0x65e7fe cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65d55d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65d770 cp_parser_namespace_body ../../gcc/gcc/cp/parser.c:15568 0x65d770 cp_parser_namespace_definition ../../gcc/gcc/cp/parser.c:15549 0x65e8f1 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10752 0x65d55d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ee46 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ee46 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 0x772524 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58563] New: [c++0x] ICE calling invalid destructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58563 Bug ID: 58563 Summary: [c++0x] ICE calling invalid destructor Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.4.0: == template void foo() { enum E {}; E().E::~T(); } == bug.cc: In function 'void foo()': bug.cc:4:11: error: 'enum foo()::E' is not a class E().E::~T(); ^ bug.cc:4:11: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_parser_lookup_name, at cp/parser.c:21759 0xcda4a9 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 0x6322f5 tree_class_check ../../gcc/gcc/tree.h:2732 0x6322f5 cp_parser_lookup_name ../../gcc/gcc/cp/parser.c:21759 0x64f3a0 cp_parser_class_name ../../gcc/gcc/cp/parser.c:18736 0x64abb4 cp_parser_unqualified_id ../../gcc/gcc/cp/parser.c:4883 0x64b3f3 cp_parser_id_expression ../../gcc/gcc/cp/parser.c:4647 0x65b8de cp_parser_postfix_dot_deref_expression ../../gcc/gcc/cp/parser.c:6368 0x643569 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6031 0x64615d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x646d3f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6471ff cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x649063 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x64985e cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x64985e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9429 0x63f187 cp_parser_statement ../../gcc/gcc/cp/parser.c:9280 0x64046e cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x6405b6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x65196b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18318 0x65196b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18354 0x6529af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22338 Please submit a full bug report, [etc.]
[Bug c++/58565] New: [c++0x] ICE with label in statement expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58565 Bug ID: 58565 Summary: [c++0x] ICE with label in statement expression Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE since GCC 4.6.0 when compiled with "-std=c++0x": === void foo() { int i = ({ L: ; }); } === bug.cc: In function 'void foo()': bug.cc:3:20: sorry, unimplemented: unexpected AST of kind label_expr int i = ({ L: ; }); ^ bug.cc:3:20: internal compiler error: in potential_constant_expression_1, at cp/semantics.c:8958 0x6ca0f4 potential_constant_expression_1 ../../gcc/gcc/cp/semantics.c:8958 0x647673 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8208 0x65332e cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16520 0x65396f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x6557d0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x6568c0 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10514 0x63f167 cp_parser_statement ../../gcc/gcc/cp/parser.c:9274 0x64046e cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x6405b6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x65196b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18318 0x65196b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18354 0x6529af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22338 0x6536b7 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22259 0x6536b7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16347 0x65396f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x6557d0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65e7fe cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65d55d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ee46 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ee46 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 Please submit a full bug report, [etc.] Without "-std=c++0x" the code is rejected correctly: bug.cc: In function 'void foo()': bug.cc:3:20: error: void value not ignored as it ought to be int i = ({ L: ; }); ^
[Bug c++/58566] New: [c++0x] ICE with invalid expression in lambda body
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58566 Bug ID: 58566 Summary: [c++0x] ICE with invalid expression in lambda body Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.8.0: = struct A { int foo() { [this]{ return foo; }; } }; = bug.cc: In lambda function: bug.cc:5:25: error: invalid use of member function (did you forget the '()' ?) [this]{ return foo; }; ^ bug.cc:5:25: internal compiler error: in check_return_expr, at cp/typeck.c:8159 0x64d09a check_return_expr(tree_node*, bool*) ../../gcc-4.8.0/gcc/cp/typeck.c:8159 0x68856e finish_return_stmt(tree_node*) ../../gcc-4.8.0/gcc/cp/semantics.c:782 0x61a92c cp_parser_lambda_body ../../gcc-4.8.0/gcc/cp/parser.c:8643 0x61a92c cp_parser_lambda_expression ../../gcc-4.8.0/gcc/cp/parser.c:8194 0x61a92c cp_parser_primary_expression ../../gcc-4.8.0/gcc/cp/parser.c:4085 0x61b82a cp_parser_postfix_expression ../../gcc-4.8.0/gcc/cp/parser.c:5629 0x61dd3a cp_parser_unary_expression ../../gcc-4.8.0/gcc/cp/parser.c:6685 0x61e8d7 cp_parser_binary_expression ../../gcc-4.8.0/gcc/cp/parser.c:7365 0x61ed65 cp_parser_assignment_expression ../../gcc-4.8.0/gcc/cp/parser.c:7590 0x620b82 cp_parser_expression ../../gcc-4.8.0/gcc/cp/parser.c:7741 0x62124a cp_parser_expression_statement ../../gcc-4.8.0/gcc/cp/parser.c:9021 0x6172e7 cp_parser_statement ../../gcc-4.8.0/gcc/cp/parser.c:8873 0x61856e cp_parser_statement_seq_opt ../../gcc-4.8.0/gcc/cp/parser.c:9139 0x6186b6 cp_parser_compound_statement ../../gcc-4.8.0/gcc/cp/parser.c:9093 0x6297e3 cp_parser_function_body ../../gcc-4.8.0/gcc/cp/parser.c:17680 0x6297e3 cp_parser_ctor_initializer_opt_and_function_body ../../gcc-4.8.0/gcc/cp/parser.c:17716 0x62a86f cp_parser_function_definition_after_declarator ../../gcc-4.8.0/gcc/cp/parser.c:21691 0x6112dc cp_parser_late_parsing_for_member ../../gcc-4.8.0/gcc/cp/parser.c:22332 0x6112dc cp_parser_class_specifier_1 ../../gcc-4.8.0/gcc/cp/parser.c:18439 0x6112dc cp_parser_class_specifier ../../gcc-4.8.0/gcc/cp/parser.c:18463 Please submit a full bug report, [etc.]
[Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567 Bug ID: 58567 Summary: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-fopenmp") triggers an ICE since GCC 4.8.0: template void foo() { #pragma omp parallel for for (typename T::X i = 0; i < 100; ++i) ; } void bar() { foo(); } bug.cc: In instantiation of 'void foo() [with T = int]': bug.cc:10:12: required from here bug.cc:4:22: error: 'int' is not a class, struct, or union type for (typename T::X i = 0; i < 100; ++i) ^ bug.cc:4:3: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'error_mark' in tsubst_omp_for_iterator, at cp/pt.c:12938 for (typename T::X i = 0; i < 100; ++i) ^ 0xcdaef7 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9348 0x5aa6b1 contains_struct_check ../../gcc/gcc/tree.h:2723 0x5aa6b1 tsubst_omp_for_iterator ../../gcc/gcc/cp/pt.c:12938 0x5a55ee tsubst_expr ../../gcc/gcc/cp/pt.c:13481 0x5a43d8 tsubst_expr ../../gcc/gcc/cp/pt.c:13446 0x5a4451 tsubst_expr ../../gcc/gcc/cp/pt.c:13284 0x5a1dcf instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19391 0x5de71f instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19492 0x6198c7 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4060 Please submit a full bug report, [etc.]
[Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568 Bug ID: 58568 Summary: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.8.1: == template struct A { static const int i; template const int A::i = []{ return 0; }(); }; == bug.cc:4:40: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in begin_lambda_type, at cp/lambda.c:144 template const int A::i = []{ return 0; }(); ^ 0xcda4a9 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 0x722a3a tree_class_check ../../gcc/gcc/tree.h:2732 0x722a3a begin_lambda_type(tree_node*) ../../gcc/gcc/cp/lambda.c:144 0x641630 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8542 0x641630 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4230 0x643970 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 0x64615d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x646d3f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6471ff cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647656 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x647656 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x653601 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16520 0x653fb4 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22652 0x656b80 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22454 0x636882 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:19703 0x63787e cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19630 0x63787e cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18885 0x63a220 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19101 0x63a220 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14080 0x64f739 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 Please submit a full bug report, [etc.]
[Bug c++/58500] [C++1y] Crash with auto in function parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58500 Volker Reichelt changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Known to work||4.9.0 Resolution|--- |FIXED Target Milestone|--- |4.9.0 --- Comment #3 from Volker Reichelt --- Fixed by Adam's patch.
[Bug c++/58536] [c++1y] ICE with auto in constructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58536 --- Comment #2 from Volker Reichelt --- It's a GNU extension as mentioned in the ChangeLog: 2013-09-16 Adam Butcher * cp-tree.h (type_uses_auto_or_concept): Declare. (is_auto_or_concept): Declare. * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions. [...]
[Bug c++/58548] [4.9 Regression] [c++1y] ICE with local struct in function with auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58548 --- Comment #3 from Volker Reichelt --- It's a GNU extension, see comment #2 in PR58536.
[Bug c++/58549] [4.9 Regression] [c++1y] ICE with local function in function with auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549 --- Comment #5 from Volker Reichelt --- It's a GNU extension, see comment #2 in PR58536.
[Bug c++/58581] New: [4.7/4.8/4.9 Regression] [c++11] ICE with no-throw specification in deleted function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58581 Bug ID: 58581 Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with no-throw specification in deleted function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "std=c++0x") triggers an ICE since GCC 4.7.0: === template int foo(T) noexcept(T()) = delete; int i = foo(0); === bug.cc:3:14: error: use of deleted function 'int foo(T) [with T = int]' int i = foo(0); ^ bug.cc:1:26: note: declared here template int foo(T) noexcept(T()) = delete; ^ bug.cc:3:14: internal compiler error: in nothrow_spec_p, at cp/except.c:1265 int i = foo(0); ^ 0x68b5fa nothrow_spec_p(tree_node const*) ../../gcc/gcc/cp/except.c:1265 0x534afb set_flags_from_callee(tree_node*) ../../gcc/gcc/cp/call.c:327 0x534c79 build_call_a(tree_node*, int, tree_node**) ../../gcc/gcc/cp/call.c:359 0x536856 build_cxx_call(tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7168 0x548739 build_over_call ../../gcc/gcc/cp/call.c:7152 0x54a371 build_new_function_call(tree_node*, vec**, bool, int) ../../gcc/gcc/cp/call.c:3917 0x6b6c3e finish_call_expr(tree_node*, vec**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2257 0x643626 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6009 0x645f6d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x646b4f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x64700f cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647466 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x647466 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x65313e cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16520 0x65377f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x6555e0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65e5ee cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65d35a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ec36 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ec36 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 Please submit a full bug report, [etc.]
[Bug c++/58582] New: [c++11] ICE defining and instantiating deleted template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58582 Bug ID: 58582 Summary: [c++11] ICE defining and instantiating deleted template function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.4.0 (when deleted functions were introduced): struct A { template void foo() = delete; }; template void A::foo() { int i; } template void A::foo<0>(); bug.cc:6:20: error: redefinition of 'void A::foo()' template void A::foo() { int i; } ^ bug.cc:3:22: note: 'void A::foo()' previously declared here template void foo() = delete; ^ bug.cc: In instantiation of 'void A::foo() [with int = 0]': bug.cc:8:25: required from here bug.cc:6:36: internal compiler error: in add_stmt, at cp/semantics.c:386 template void A::foo() { int i; } ^ 0x6ae530 add_stmt(tree_node*) ../../gcc/gcc/cp/semantics.c:386 0x5a43ac tsubst_expr ../../gcc/gcc/cp/pt.c:13289 0x5a1cdf instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19391 0x5de5ff instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19492 0x619766 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4060 Please submit a full bug report, [etc.] A slightly modified example (just leave out "int i;") crashes in a different place: struct A { template void foo() = delete; }; template void A::foo() {} template void A::foo<0>(); bug.cc:6:20: error: redefinition of 'void A::foo()' template void A::foo() {} ^ bug.cc:3:22: note: 'void A::foo()' previously declared here template void foo() = delete; ^ bug.cc: In instantiation of 'void A::foo() [with int = 0]': bug.cc:8:25: required from here bug.cc:6:30: internal compiler error: in finish_function, at cp/decl.c:13810 template void A::foo() {} ^ 0x56ab15 finish_function(int) ../../gcc/gcc/cp/decl.c:13810 0x5a1d18 instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19402 0x5de5ff instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19492 0x619766 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4060 Please submit a full bug report, [etc.]
[Bug c++/58583] New: [c++11] ICE with invalid non-static data member initialization in template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58583 Bug ID: 58583 Summary: [c++11] ICE with invalid non-static data member initialization in template Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") is wrongly accepted since GCC 4.7.0 (when non-static data member initializers were introduced): == template struct A { A* p = new A; }; == Even instantiating A<0> doesn't produce an error. However, without template the code is rejected correctly. A slightly modified code snippet triggers an ICE: == struct B { template struct A { A* p = new A<0>; }; }; == bug.cc: In constructor 'constexpr B::A<0>::A()': bug.cc:3:26: internal compiler error: in tsubst_copy, at cp/pt.c:12810 template struct A ^ 0x5bbd53 tsubst_copy ../../gcc/gcc/cp/pt.c:12810 0x59aa12 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:14855 0x69636c perform_member_init ../../gcc/gcc/cp/init.c:538 0x69636c emit_mem_initializers(tree_node*) ../../gcc/gcc/cp/init.c:1093 0x6a0a2e synthesize_method(tree_node*) ../../gcc/gcc/cp/method.c:796 0x617659 mark_used(tree_node*, int) ../../gcc/gcc/cp/decl2.c:4714 0x54889b build_over_call ../../gcc/gcc/cp/call.c:7116 0x54477e build_new_method_call_1 ../../gcc/gcc/cp/call.c:7813 0x54477e build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7883 0x5456f2 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../gcc/gcc/cp/call.c:7440 0x699086 build_new_1 ../../gcc/gcc/cp/init.c:2761 0x699086 build_new(vec**, tree_node*, tree_node*, vec**, int, int) ../../gcc/gcc/cp/init.c:3001 0x645ad2 cp_parser_new_expression ../../gcc/gcc/cp/parser.c:7139 0x646097 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:6910 0x646b4f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x64700f cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647466 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x647466 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x648a36 cp_parser_late_parse_one_default_arg ../../gcc/gcc/cp/parser.c:23055 0x637c35 cp_parser_late_parsing_nsdmi ../../gcc/gcc/cp/parser.c:23109 Please submit a full bug report, [etc.]
[Bug c++/58584] New: [c++11] ICE with invalid argument for alignas
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58584 Bug ID: 58584 Summary: [c++11] ICE with invalid argument for alignas Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.8.0 (when alignas was introduced): struct A { int i alignas(this); }; bug.cc:3:17: error: invalid use of 'this' at top level int i alignas(this); ^ bug.cc:3:17: internal compiler error: tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1325 0xcd8a0a tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x6110cb tree_check ../../gcc/gcc/tree.h:2609 0x6110cb cp_check_const_attributes ../../gcc/gcc/cp/decl2.c:1325 0x6110cb cplus_decl_attributes(tree_node**, tree_node*, int) ../../gcc/gcc/cp/decl2.c:1351 0x6161b7 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*, bool, tree_node*, tree_node*) ../../gcc/gcc/cp/decl2.c:989 0x636a92 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20084 0x6376ce cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19630 0x6376ce cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18885 0x63a070 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19101 0x63a070 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14080 0x64f549 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x6535d9 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10918 0x6555e0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65e5ee cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65d35a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ec36 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ec36 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 0x772143 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] A template version of the code crashes in a different place: template struct A { int i alignas(this); }; neu50B.cc:3:17: error: invalid use of 'this' at top level int i alignas(this); ^ neu50B.cc:3:17: internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:659 0xcd8a0a tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x72a595 tree_check ../../gcc/gcc/tree.h:2819 0x72a595 get_attribute_name(tree_node const*) ../../gcc/gcc/attribs.c:659 0x610d23 is_late_template_attribute ../../gcc/gcc/cp/decl2.c:1120 0x610d23 splice_template_attributes ../../gcc/gcc/cp/decl2.c:1200 0x610d23 save_template_attributes ../../gcc/gcc/cp/decl2.c:1221 0x610d23 cplus_decl_attributes(tree_node**, tree_node*, int) ../../gcc/gcc/cp/decl2.c:1348 0x6161b7 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*, bool, tree_node*, tree_node*) ../../gcc/gcc/cp/decl2.c:989 0x636a92 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20084 0x6376ce cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19630 0x6376ce cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18885 0x63a070 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19101 0x63a070 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14080 0x64f549 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x653bb3 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22578 0x656990 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22454 0x65e789 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10728 0x65d35a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ec36 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ec36 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 Please submit a full bug report, [etc.]
[Bug middle-end/58585] New: [4.9 Regression] ICE in ipa with virtual inheritance
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58585 Bug ID: 58585 Summary: [4.9 Regression] ICE in ipa with virtual inheritance Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE on trunk when compiled with "-O2 -fPIC": struct A { virtual void foo() {} void bar(); }; void A::bar() { foo(); } struct B : virtual A { virtual void foo() {} char c; }; struct C : virtual B { C(); }; C::C() { bar(); } bug.cc:18:17: internal compiler error: in ipa_get_indirect_edge_target_1, at ipa-cp.c:1570 C::C() { bar(); } ^ 0xf46f8d ipa_get_indirect_edge_target_1 ../../gcc/gcc/ipa-cp.c:1569 0x9958fe estimate_edge_devirt_benefit ../../gcc/gcc/ipa-inline-analysis.c:2783 0x9958fe estimate_edge_size_and_time ../../gcc/gcc/ipa-inline-analysis.c:2815 0x9958fe estimate_calls_size_and_time ../../gcc/gcc/ipa-inline-analysis.c:2868 0x996a72 estimate_node_size_and_time ../../gcc/gcc/ipa-inline-analysis.c:2955 0x999046 do_estimate_edge_size(cgraph_edge*) ../../gcc/gcc/ipa-inline-analysis.c:3498 0x99918c estimate_edge_size ../../gcc/gcc/ipa-inline.h:275 0x99918c estimate_edge_growth ../../gcc/gcc/ipa-inline.h:287 0x99918c do_estimate_growth_1 ../../gcc/gcc/ipa-inline-analysis.c:3609 0x8004de cgraph_for_node_and_aliases(cgraph_node*, bool (*)(cgraph_node*, void*), void*, bool) ../../gcc/gcc/cgraph.c:2156 0x999617 do_estimate_growth(cgraph_node*) ../../gcc/gcc/ipa-inline-analysis.c:3623 0xf5513d estimate_growth ../../gcc/gcc/ipa-inline.h:262 0xf5513d inline_small_functions ../../gcc/gcc/ipa-inline.c:1549 0xf5513d ipa_inline ../../gcc/gcc/ipa-inline.c:2009 0xf5513d execute ../../gcc/gcc/ipa-inline.c:2379 Please submit a full bug report, [etc.] The regression appeared between 4.9.0-20130922 and 4.9.0-20130926.
[Bug c++/28525] ICE after duplicate_decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28525 Volker Reichelt changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |WORKSFORME --- Comment #4 from Volker Reichelt --- Doesn't seem to be a problem anymore.
[Bug middle-end/26784] Non C based frontend ICEs on -fmudflap
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26784 Volker Reichelt changed: What|Removed |Added Keywords|ice-on-invalid-code,| |monitored | Status|NEW |RESOLVED Known to work||4.7.0 Resolution|--- |FIXED Known to fail||4.0.0, 4.2.0, 4.6.0 --- Comment #4 from Volker Reichelt --- This seems to be fixed since GCC 4.7.0. The ICE is gone and a sensible warning is given (although the second line of the warning is still questionable): f951: warning: command line option '-fmudflap' is valid for C/C++/ObjC/ObjC++ but not for Fortran [enabled by default] f951: warning: command line option '-fno-builtin' is valid for C/C++/ObjC/ObjC++ but not for Fortran [enabled by default]
[Bug c++/58596] New: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58596 Bug ID: 58596 Summary: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0: == struct A { int i = [] { return decltype(i)(); }(); }; == bug.cc: In lambda function: bug.cc:3:32: internal compiler error: Segmentation fault int i = [] { return decltype(i)(); }(); ^ 0xaef4bf crash_signal ../../gcc/gcc/toplev.c:335 0x54c0cd contains_struct_check ../../gcc/gcc/tree.h:2722 0x54c0cd build_new_op_1 ../../gcc/gcc/cp/call.c:5154 0x54cf47 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/gcc/cp/call.c:5513 0x672529 build_x_indirect_ref(unsigned int, tree_node*, ref_operator, int) ../../gcc/gcc/cp/typeck.c:2866 0x6b165a finish_non_static_data_member(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:1580 0x6b6b5f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc/gcc/cp/semantics.c:3418 0x642cfb cp_parser_decltype_expr ../../gcc/gcc/cp/parser.c:11653 0x642cfb cp_parser_decltype ../../gcc/gcc/cp/parser.c:11781 0x65a862 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14288 0x641fe4 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5737 0x64483d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x64540f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6458cf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647733 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x641125 cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x641125 cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9035 0x641125 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8574 0x641125 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4230 0x642050 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 Please submit a full bug report, [etc.]
[Bug c++/58597] New: [c++11] ICE with lambda in default argument of template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58597 Bug ID: 58597 Summary: [c++11] ICE with lambda in default argument of template function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.5.0 (when lambdas were introduced): === template struct A { template A(T, int = []{ return 0; }()) {} }; A a = 0; === bug.cc: In substitution of 'template A< >::A(T, int) [with T = int]': bug.cc:6:12: required from here bug.cc:6:12: internal compiler error: in instantiate_template_1, at cp/pt.c:15008 A a = 0; ^ 0x5d0b93 instantiate_template_1 ../../gcc/gcc/cp/pt.c:15008 0x5d0b93 instantiate_template(tree_node*, tree_node*, int) ../../gcc/gcc/cp/pt.c:15117 0x5d264a fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15466 0x53f0fc add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x53ae69 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x53ae69 add_candidates ../../gcc/gcc/cp/call.c:5075 0x53bd40 build_user_type_conversion_1 ../../gcc/gcc/cp/call.c:3484 0x546013 build_user_type_conversion(tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/call.c:3653 0x6843da ocp_convert(tree_node*, tree_node*, int, int, int) ../../gcc/gcc/cp/cvt.c:865 0x6913dd expand_default_init ../../gcc/gcc/cp/init.c:1597 0x6913dd expand_aggr_init_1 ../../gcc/gcc/cp/init.c:1766 0x693b79 build_aggr_init(tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/init.c:1517 0x557da5 build_aggr_init_full_exprs ../../gcc/gcc/cp/decl.c:5543 0x557da5 check_initializer ../../gcc/gcc/cp/decl.c:5678 0x56aa5c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6347 0x65196f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16567 0x65207f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x653ee0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65cf1e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65bc8a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 Please submit a full bug report, [etc.]
[Bug c++/58599] New: [c++11] Trouble with non-static data member initializers in templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58599 Bug ID: 58599 Summary: [c++11] Trouble with non-static data member initializers in templates Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following code snippets (compiled with "-std=c++11") trigger ICEs various places since GCC 4.7.0 (when non-static data member initializers were introduced): = template struct A; template<> struct A<0> { template struct B { template int foo() {} int i = foo(); }; }; = bug.cc: In substitution of 'template template int A<0>::B< , >::foo() [with = ; = int; = ]': bug.cc:9:22: required from here bug.cc:7:28: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst_pack_expansion, at cp/pt.c:9535 template int foo() {} ^ 0xce33c5 tree_vec_elt_check_failed(int, int, char const*, int, char const*) ../../gcc/gcc/tree.c:9361 0x5aa862 tree_vec_elt_check ../../gcc/gcc/tree.h:2799 0x5aa862 tsubst_pack_expansion ../../gcc/gcc/cp/pt.c:9535 0x5b89a2 tsubst_template_args ../../gcc/gcc/cp/pt.c:9738 0x5b87dc tsubst_template_args ../../gcc/gcc/cp/pt.c:9756 0x5b910e tsubst_aggr_type ../../gcc/gcc/cp/pt.c:9971 0x5acb1d tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11364 0x5ac217 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11354 0x5b6fa6 tsubst_arg_types ../../gcc/gcc/cp/pt.c:11012 0x5b73ce tsubst_function_type ../../gcc/gcc/cp/pt.c:1 0x5aca1c tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11822 0x5d21d5 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15361 0x53f0fc add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x53ae69 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x53ae69 add_candidates ../../gcc/gcc/cp/call.c:5075 0x542536 build_new_method_call_1 ../../gcc/gcc/cp/call.c:7697 0x542536 build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7883 0x6427ad cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5980 0x64483d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x64540f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 Please submit a full bug report, [etc.] = template struct A; template<> struct A<0> { template struct B { template int foo() {} int i = foo(); }; }; = bug.cc: In substitution of 'template template int A<0>::B< , >::foo() [with = ; = int; = ]': bug.cc:9:22: required from here bug.cc:7:28: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:11429 template int foo() {} ^ 0xce33c5 tree_vec_elt_check_failed(int, int, char const*, int, char const*) ../../gcc/gcc/tree.c:9361 0x5aea72 tree_vec_elt_check ../../gcc/gcc/tree.h:2799 0x5aea72 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11429 0x5b86fa tsubst_template_args ../../gcc/gcc/cp/pt.c:9774 0x5b910e tsubst_aggr_type ../../gcc/gcc/cp/pt.c:9971 0x5acb1d tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11364 0x5ac217 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11354 0x5b6fa6 tsubst_arg_types ../../gcc/gcc/cp/pt.c:11012 0x5b73ce tsubst_function_type ../../gcc/gcc/cp/pt.c:1 0x5aca1c tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11822 0x5d21d5 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15361 0x53f0fc add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x53ae69 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x53ae69 add_candidates ../../gcc/gcc/cp/call.c:5075 0x542536 build_new_method_call_1 ../../gcc/gcc/cp/call.c:7697 0x542536 build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7883 0x6427ad cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5980 0x64483d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x6454
[Bug c++/58600] New: [c++0x] ICE on wrong usage of alignas
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58600 Bug ID: 58600 Summary: [c++0x] ICE on wrong usage of alignas Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0 (when alignas was introduced): namespace N {} using namespace N alignas(int); bug.cc:2:30: internal compiler error: tree check: expected identifier_node, have tree_list in private_is_attribute_p, at tree.c:5540 using namespace N alignas(int); ^ 0xcd87ea tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0xcd8b64 tree_check ../../gcc/gcc/tree.h:2819 0xcd8b64 private_is_attribute_p(char const*, unsigned long, tree_node const*) ../../gcc/gcc/tree.c:5540 0x6ff9ff is_attribute_p ../../gcc/gcc/tree.h:3678 0x6ff9ff parse_using_directive(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:3995 0x6545c2 cp_parser_using_directive ../../gcc/gcc/cp/parser.c:15951 0x6545c2 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10837 0x65cf1e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65bc8a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65d556 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65d556 c_parse_file() ../../gcc/gcc/cp/parser.c:28899 0x7709e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] A slightly modified example crashes in a different location: namespace N {} using namespace N alignas(X); bug.cc:2:27: error: 'X' was not declared in this scope using namespace N alignas(X); ^ bug.cc:2:27: internal compiler error: tree check: expected tree_list, have error_mark in parse_using_directive, at cp/name-lookup.c:3994 0xcd87ea tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x6ffabe tree_check ../../gcc/gcc/tree.h:2609 0x6ffabe parse_using_directive(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:3994 0x6545c2 cp_parser_using_directive ../../gcc/gcc/cp/parser.c:15951 0x6545c2 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10837 0x65cf1e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65bc8a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65d556 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65d556 c_parse_file() ../../gcc/gcc/cp/parser.c:28899 0x7709e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606 Bug ID: 58606 Summary: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0: template struct A { template struct B; template struct B {}; }; bug.cc:5:35: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have template_decl in lookup_template_class_1, at cp/pt.c:7645 template struct B {}; ^ 0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x54c851 tree_check3(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code) ../../gcc/gcc/tree.h:2649 0x5b44be lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7645 0x5b44be lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7695 0x6b4572 finish_template_type(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:2856 0x64cc60 cp_parser_template_id ../../gcc/gcc/cp/parser.c:13219 0x64ce92 cp_parser_class_name ../../gcc/gcc/cp/parser.c:18752 0x642b6f cp_parser_qualifying_entity ../../gcc/gcc/cp/parser.c:5448 0x642b6f cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:5173 0x6362ce cp_parser_class_head ../../gcc/gcc/cp/parser.c:19194 0x6362ce cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18833 0x638180 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19102 0x638180 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14081 0x64d679 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x651cf3 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22580 0x654b18 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22456 0x6347e2 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:19704 0x6357de cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19631 0x6357de cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18886 0x638180 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19102 Please submit a full bug report, [etc.]
[Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607 Bug ID: 58607 Summary: [4.9 Regression] ICE with undeclared variable in constexpr Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE on trunk (GCC 4.9.0 20130920): = struct A { constexpr A() { i; } }; = bug.cc: In constructor 'constexpr A::A()': bug.cc:3:19: error: 'i' was not declared in this scope constexpr A() { i; } ^ bug.cc:3:22: internal compiler error: in build_data_member_initialization, at cp/semantics.c:6032 constexpr A() { i; } ^ 0x6c177e build_data_member_initialization ../../gcc/gcc/cp/semantics.c:6032 0x6c1cc9 build_constexpr_constructor_member_initializers ../../gcc/gcc/cp/semantics.c:6209 0x6c1cc9 massage_constexpr_body ../../gcc/gcc/cp/semantics.c:6290 0x6c94f3 register_constexpr_fundef(tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:6394 0x568058 maybe_save_function_definition ../../gcc/gcc/cp/decl.c:13771 0x568058 finish_function(int) ../../gcc/gcc/cp/decl.c:13892 0x65090d cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22346 0x635fbc cp_parser_late_parsing_for_member ../../gcc/gcc/cp/parser.c:22995 0x635fbc cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19078 0x638180 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19102 0x638180 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14081 0x64d679 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11328 0x651719 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10918 0x653740 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65c76e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65b4da cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65cda6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cda6 c_parse_file() ../../gcc/gcc/cp/parser.c:28900 0x7707e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58609] New: [4.9 Regression] [c++11] ICE with uninitialized variable in constexpr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58609 Bug ID: 58609 Summary: [4.9 Regression] [c++11] ICE with uninitialized variable in constexpr Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE on trunk (since at least GCC 4.9.0 20130920): === struct A { static constexpr int&& i = 0; }; int j = A::i; === bug.cc:3:30: error: non-constant in-class initialization invalid for static member 'A::i' static constexpr int&& i = 0; ^ bug.cc:3:30: error: (an out of class initialization is required) cc1plus: internal compiler error: in record_reference, at cgraphbuild.c:66 0x7ff843 record_reference ../../gcc/gcc/cgraphbuild.c:66 0xcf44ab walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:10928 0xcf48e5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:11191 0x8001fd record_references_in_initializer(tree_node*, bool) ../../gcc/gcc/cgraphbuild.c:427 0xd2ce67 varpool_analyze_node(varpool_node*) ../../gcc/gcc/varpool.c:398 0x804147 analyze_functions ../../gcc/gcc/cgraphunit.c:1035 0x805669 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2260 0x6188a0 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4360 Please submit a full bug report, [etc.]
[Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610 Bug ID: 58610 Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.0: = struct A { template A(); }; constexpr A a; = bug.cc:6:13: error: the type 'const A' of constexpr variable 'a' is not literal constexpr A a; ^ bug.cc:1:8: note: 'A' is not literal because: struct A ^ bug.cc:1:8: note: 'A' is not an aggregate, does not have a trivial default constructor, and has no constexpr constructor that is not a copy or move constructor bug.cc:6:13: internal compiler error: tree check: expected function_decl, have template_decl in explain_non_literal_class, at cp/class.c:5327 constexpr A a; ^ 0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x5f099c tree_check ../../gcc/gcc/tree.h:2609 0x5f099c explain_non_literal_class(tree_node*) ../../gcc/gcc/cp/class.c:5327 0x6bf46b ensure_literal_type_for_constexpr_object(tree_node*) ../../gcc/gcc/cp/semantics.c:5814 0x5696fb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6157 0x65119f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16568 0x6518bf cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x653740 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65c76e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65b4da cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65cda6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cda6 c_parse_file() ../../gcc/gcc/cp/parser.c:28900 0x7707e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58611] New: [4.7/4.8/4.9 Regression] [c++11] ICE with invalid constexpr constructor used in array initialization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58611 Bug ID: 58611 Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with invalid constexpr constructor used in array initialization Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.3: = struct A { int i; constexpr A() {} }; struct B { A a; }; constexpr B b[] = { {} }; = bug.cc: In constructor 'constexpr A::A()': bug.cc:4:18: error: uninitialized member 'A::i' in 'constexpr' constructor constexpr A() {} ^ bug.cc: At global scope: bug.cc:12:24: internal compiler error: in reshape_init_r, at cp/decl.c:5434 constexpr B b[] = { {} }; ^ 0x5564f9 reshape_init_r ../../gcc/gcc/cp/decl.c:5434 0x556812 reshape_init_array_1 ../../gcc/gcc/cp/decl.c:5102 0x5558b9 reshape_init(tree_node*, tree_node*, int) ../../gcc/gcc/cp/decl.c:5489 0x6bdeb8 finish_compound_literal(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:2481 0x557ccb check_initializer ../../gcc/gcc/cp/decl.c:5707 0x56a2ec cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6347 0x65119f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16568 0x6518bf cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x653740 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65c76e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65b4da cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65cda6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cda6 c_parse_file() ../../gcc/gcc/cp/parser.c:28900 0x7707e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58612] New: [4.8/4.9 Regression] [c++11] ICE calling non-constexpr from constexpr in template class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58612 Bug ID: 58612 Summary: [4.8/4.9 Regression] [c++11] ICE calling non-constexpr from constexpr in template class Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE on the 4.8 branch (since at least 4.8.2 20130920) and trunk: === struct A { int foo() const { return 0; } }; template struct B { A a; constexpr int bar() { return a.foo(); } }; constexpr int i = B().bar(); === bug.cc:12:33: error: 'constexpr int B< >::bar() const [with = void]' called in a constant expression constexpr int i = B().bar(); ^ bug.cc:9:17: note: 'constexpr int B< >::bar() const [with = void]' is not usable as a constexpr function because: constexpr int bar() { return a.foo(); } ^ bug.cc:9:17: internal compiler error: Segmentation fault 0xaef62f crash_signal ../../gcc/gcc/toplev.c:335 0xcf44ba walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:10934 0xcf48e5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, pointer_set_t*)) ../../gcc/gcc/tree.c:11191 0x6d0347 break_out_target_exprs(tree_node*) ../../gcc/gcc/cp/tree.c:2366 0x6c19eb massage_constexpr_body ../../gcc/gcc/cp/semantics.c:6299 0x6c2388 explain_invalid_constexpr_fn(tree_node*) ../../gcc/gcc/cp/semantics.c:6462 0x6c2986 cxx_eval_call_expression ../../gcc/gcc/cp/semantics.c:6831 0x6c3f4f cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:7904 0x6c6f66 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:8217 0x5e0c75 store_init_value(tree_node*, tree_node*, vec**, int) ../../gcc/gcc/cp/typeck2.c:786 0x557408 check_initializer ../../gcc/gcc/cp/decl.c:5728 0x56a2ec cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6347 0x65119f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16568 0x6518bf cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x653740 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x65c76e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65b4da cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65cda6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cda6 c_parse_file() ../../gcc/gcc/cp/parser.c:28900 0x7707e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58613] New: [4.9 Regression] [c++1y] ICE with invalid lambda capture
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58613 Bug ID: 58613 Summary: [4.9 Regression] [c++1y] ICE with invalid lambda capture Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++1y") triggers an ICE on trunk (since at least 4.9.0 20130920): === void foo(int i) { [i()](){}; } === bug.cc: In function 'void foo(int)': bug.cc:3:6: internal compiler error: Segmentation fault [i()](){}; ^ 0xaef62f crash_signal ../../gcc/gcc/toplev.c:335 0x72286d add_capture(tree_node*, tree_node*, tree_node*, bool, bool) ../../gcc/gcc/cp/lambda.c:444 0x63ebab cp_parser_lambda_introducer ../../gcc/gcc/cp/parser.c:8797 0x63ebab cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8540 0x63ebab cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4230 0x6418b0 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 0x64407d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x644c4f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x64510f cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x646f73 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x64777e cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x64777e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9429 0x63d0b7 cp_parser_statement ../../gcc/gcc/cp/parser.c:9280 0x63e3a2 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e4e6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f89b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18319 0x64f89b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18355 0x6508ef cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22340 0x651605 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22261 0x651605 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 Please submit a full bug report, [etc.]
[Bug c++/58614] New: [c++11] ICE with undeclared variable in initializer list
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58614 Bug ID: 58614 Summary: [c++11] ICE with undeclared variable in initializer list Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11" or "-std=c++0x" for older versions) triggers an ICE since GCC 4.4.0 (when initializer lists were introduced): === #include void foo() { i; auto j { i }; } === bug.cc: In function 'void foo()': bug.cc:5:3: error: 'i' was not declared in this scope i; ^ bug.cc:6:14: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in maybe_adjust_types_for_deduction, at cp/pt.c:15597 auto j { i }; ^ 0xcd8a39 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 0x5814af tree_class_check ../../gcc/gcc/tree.h:2732 0x5814af maybe_adjust_types_for_deduction ../../gcc/gcc/cp/pt.c:15597 0x5c45d0 unify ../../gcc/gcc/cp/pt.c:16914 0x5cdb8a unify_one_argument ../../gcc/gcc/cp/pt.c:15900 0x5c2cf2 type_unification_real ../../gcc/gcc/cp/pt.c:15972 0x5d69b2 do_auto_deduction(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/pt.c:21153 0x5696cd cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6151 0x65119f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16568 0x6518bf cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10986 0x653740 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10867 0x654860 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10514 0x63d097 cp_parser_statement ../../gcc/gcc/cp/parser.c:9274 0x63e3a2 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e4e6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f89b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18319 0x64f89b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18355 0x6508ef cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22340 0x651605 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22261 0x651605 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16348 Please submit a full bug report, [etc.]
[Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58632 Bug ID: 58632 Summary: [4.8/4.9 Regression] ICE reusing template parameter name as class name Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid line of code triggers an ICE since GCC 4.8.0: = template class A> class A {}; = bug.cc:1:39: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have template_template_parm in xref_basetypes, at cp/decl.c:12220 template class A> class A {}; ^ 0xcd860a tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x560941 tree_check3 ../../gcc/gcc/tree.h:2649 0x560941 xref_basetypes(tree_node*, tree_node*) ../../gcc/gcc/cp/decl.c:12220 0x63776f cp_parser_class_head ../../gcc/gcc/cp/parser.c:19541 0x63776f cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18842 0x638230 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19111 0x638230 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14090 0x64d739 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11337 0x651dc3 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22591 0x654be8 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22467 0x65c9d9 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10737 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65ce76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ce76 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x7708b3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58633] New: [4.7/4.8/4.9 Regression] ICE with decltype of destructor call
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58633 Bug ID: 58633 Summary: [4.7/4.8/4.9 Regression] ICE with decltype of destructor call Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++0x") triggers an ICE since GCC 4.7.0: void foo(int i) { typedef int I; __decltype(i.I::~I())* p; } bug.cc: In function 'void foo(int)': bug.cc:4:22: internal compiler error: in cp_parser_abort_tentative_parse, at cp/parser.c:24356 __decltype(i.I::~I())* p; ^ 0x62fa03 cp_parser_abort_tentative_parse ../../gcc/gcc/cp/parser.c:24355 0x64270c cp_parser_decltype_expr ../../gcc/gcc/cp/parser.c:11708 0x64270c cp_parser_decltype ../../gcc/gcc/cp/parser.c:11791 0x65a192 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14298 0x637ea5 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14168 0x64d739 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11337 0x6517e9 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10927 0x653810 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x654930 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10523 0x63d147 cp_parser_statement ../../gcc/gcc/cp/parser.c:9274 0x63e452 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e596 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f95b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18328 0x64f95b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18364 0x6509af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22351 0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22272 0x6516d5 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16357 0x65198f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 0x653810 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x65c83e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10773 Please submit a full bug report, [etc.]
[Bug c++/58634] New: [c++11] ICE initializing static class member via an anonymous class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58634 Bug ID: 58634 Summary: [c++11] ICE initializing static class member via an anonymous class Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++0x") triggers an ICE on trunk (since at least 4.9.0 20130920): === struct A { static const int i; }; const int A::i = (struct { int j=0; }){}.j; === bug.cc:6:26: internal compiler error: in nested_anon_class_index, at cp/mangle.c:1403 const int A::i = (struct { int j=0; }){}.j; ^ 0x6eca7e nested_anon_class_index ../../gcc/gcc/cp/mangle.c:1403 0x6eca7e write_unnamed_type_name ../../gcc/gcc/cp/mangle.c:1417 0x6eca7e write_unqualified_name ../../gcc/gcc/cp/mangle.c:1277 0x6f5937 write_prefix ../../gcc/gcc/cp/mangle.c:1059 0x6ed0c6 write_nested_name ../../gcc/gcc/cp/mangle.c:963 0x6ed6fc write_name ../../gcc/gcc/cp/mangle.c:864 0x6edd7f write_encoding ../../gcc/gcc/cp/mangle.c:719 0x6ee10d write_mangled_name ../../gcc/gcc/cp/mangle.c:689 0x6f6ac5 mangle_decl_string ../../gcc/gcc/cp/mangle.c:3446 0x6f6cf8 get_mangled_id ../../gcc/gcc/cp/mangle.c:3468 0x6f6cf8 mangle_decl(tree_node*) ../../gcc/gcc/cp/mangle.c:3491 0xcda6d0 decl_assembler_name(tree_node*) ../../gcc/gcc/tree.c:546 0x60ff4f comdat_linkage(tree_node*) ../../gcc/gcc/cp/decl2.c:1636 0x6b7a25 expand_or_defer_fn_1(tree_node*) ../../gcc/gcc/cp/semantics.c:3911 0x6b7f68 expand_or_defer_fn(tree_node*) ../../gcc/gcc/cp/semantics.c:3944 0x6e65c7 maybe_clone_body(tree_node*) ../../gcc/gcc/cp/optimize.c:428 0x6b798f expand_or_defer_fn_1(tree_node*) ../../gcc/gcc/cp/semantics.c:3874 0x6b7f68 expand_or_defer_fn(tree_node*) ../../gcc/gcc/cp/semantics.c:3944 0x69e8a1 synthesize_method(tree_node*) ../../gcc/gcc/cp/method.c:809 0x615789 mark_used(tree_node*, int) ../../gcc/gcc/cp/decl2.c:4719 Please submit a full bug report, [etc.]
[Bug c++/58635] New: [c++11] ICE with __transaction_atomic and noexcept(false)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58635 Bug ID: 58635 Summary: [c++11] ICE with __transaction_atomic and noexcept(false) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following three code snippets (compiled with "-std=c++0x -fgnu-tm") trigger slightly different ICEs in build_transaction_expr since GCC 4.7.0. The first two snippets are valid, the last one is invalid: === int foo() { return __transaction_atomic noexcept(false) (false); } === bug.cc: In function 'int foo()': bug.cc:3:53: internal compiler error: tree check: expected class 'expression', have 'constant' (integer_cst) in build_transaction_expr, at cp/semantics.c:5224 return __transaction_atomic noexcept(false) (false); ^ 0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 0x6bcf7a expr_check ../../gcc/gcc/tree.h:2778 0x6bcf7a build_transaction_expr(unsigned int, tree_node*, int, tree_node*) ../../gcc/gcc/cp/semantics.c:5224 0x6443e9 cp_parser_transaction_expression ../../gcc/gcc/cp/parser.c:28568 0x6443e9 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:6845 0x644cff cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6451bf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647023 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x63dbf2 cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x63dbf2 cp_parser_jump_statement ../../gcc/gcc/cp/parser.c:10472 0x63dbf2 cp_parser_statement ../../gcc/gcc/cp/parser.c:9182 0x63e452 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e596 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f95b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18328 0x64f95b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18364 0x6509af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22351 0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22272 0x6516d5 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16357 0x65198f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 0x653810 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 Please submit a full bug report, [etc.] === int foo(int i) { return __transaction_atomic noexcept(false) (i); } === bug.cc: In function 'int foo(int)': bug.cc:3:49: internal compiler error: tree check: expected class 'expression', have 'declaration' (parm_decl) in build_transaction_expr, at cp/semantics.c:5224 return __transaction_atomic noexcept(false) (i); ^ 0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 [etc.] === int foo() { return __transaction_atomic noexcept(false) (x); } === bug.cc: In function 'int foo()': bug.cc:3:48: error: 'x' was not declared in this scope return __transaction_atomic noexcept(false) (x); ^ bug.cc:3:49: internal compiler error: tree check: expected class 'expression', have 'exceptional' (error_mark) in build_transaction_expr, at cp/semantics.c:5224 return __transaction_atomic noexcept(false) (x); ^ 0xcd8c59 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9227 [etc.]
[Bug c++/57945] [4.9 Regression] ICE: in varpool_get_node, at cgraph.h:840
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57945 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-valid-code Last reconfirmed|2013-07-27 00:00:00 |2013-10-05 CC||reichelt at gcc dot gnu.org Known to work||4.7.0, 4.8.0 Known to fail||4.9.0 --- Comment #1 from Volker Reichelt --- Here's an even simpler testcase which is probably valid (at least it was accepted in 4.8.x): = static int i __attribute__((weakref("j"))); = cc1plus: internal compiler error: in varpool_get_node, at cgraph.h:891 0x512ddc varpool_get_node ../../gcc/gcc/cgraph.h:891 0xd2d101 varpool_get_node ../../gcc/gcc/varpool.c:389 0xd2d101 varpool_analyze_node(varpool_node*) ../../gcc/gcc/varpool.c:396 0x804217 analyze_functions ../../gcc/gcc/cgraphunit.c:1035 0x805739 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2260 0x618920 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4365 Please submit a full bug report, [etc.]
[Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636 Bug ID: 58636 Summary: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following similar invalid code snippets (compiled with "-std=c++11") trigger ICEs in different parts of the compiler: #include int foo(std::initializer_list); int i = foo({ 0 }); bug.cc:5:18: error: 'const' qualifiers cannot be applied to 'int&&' int i = foo({ 0 }); ^ In file included from bug.cc:1:0: .../include/c++/4.9.0/initializer_list: In instantiation of 'class std::initializer_list': bug.cc:5:18: required from here .../include/c++/4.9.0/initializer_list:54:26: error: forming pointer to reference type 'int&&' typedef const _E* iterator; ^ .../include/c++/4.9.0/initializer_list:55:26: error: forming pointer to reference type 'int&&' typedef const _E* const_iterator; ^ bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:5:18: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3734 int i = foo({ 0 }); ^ 0x96977d gimplify_init_ctor_eval ../../gcc/gcc/gimplify.c:3734 0x96fbd4 gimplify_init_constructor ../../gcc/gcc/gimplify.c:4133 0x970a7e gimplify_modify_expr_rhs ../../gcc/gcc/gimplify.c:4518 0x970de4 gimplify_modify_expr ../../gcc/gcc/gimplify.c:4834 0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7332 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x964130 gimplify_and_add ../../gcc/gcc/gimplify.c:329 0x964130 internal_get_tmp_var ../../gcc/gcc/gimplify.c:594 0x964bae gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8163 0x96dec9 gimplify_call_expr ../../gcc/gcc/gimplify.c:2635 0x96567a gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7303 0x970f58 gimplify_modify_expr ../../gcc/gcc/gimplify.c:4875 0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7332 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x9656fe gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5485 0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7669 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x964f9b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x964f9b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7721 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 Please submit a full bug report, [etc.] === #include auto i = std::initializer_list{ 0 }; === In file included from bug.cc:1:0: .../include/c++/4.9.0/initializer_list: In instantiation of 'class std::initializer_list': bug.cc:3:42: required from here .../include/c++/4.9.0/initializer_list:54:26: error: forming pointer to reference type 'int&&' typedef const _E* iterator; ^ .../include/c++/4.9.0/initializer_list:55:26: error: forming pointer to reference type 'int&&' typedef const _E* const_iterator; ^ bug.cc:3:42: error: 'const' qualifiers cannot be applied to 'int&&' auto i = std::initializer_list{ 0 }; ^ bug.cc:3:42: internal compiler error: in split_nonconstant_init_1, at cp/typeck2.c:597 0x5dd883 split_nonconstant_init_1 ../../gcc/gcc/cp/typeck2.c:597 0x5e0f12 split_nonconstant_init ../../gcc/gcc/cp/typeck2.c:692 0x5e0f12 store_init_value(tree_node*, tree_node*, vec**, int) ../../gcc/gcc/cp/typeck2.c:810 0x557478 check_initializer ../../gcc/gcc/cp/decl.c:5728 0x56a35c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6347 0x651267 cp_parser_init_declarator ../
[Bug c++/58466] [4.8/4.9 Regression] ICE in cxx_eval_constant_expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58466 Volker Reichelt changed: What|Removed |Added CC||reichelt at gcc dot gnu.org Known to work||4.7.0, 4.8.0 Known to fail||4.8.1, 4.8.2, 4.9.0 --- Comment #1 from Volker Reichelt --- Here's an even simpler testcase: = template struct A; template struct B; template struct B> {}; B> b; =
[Bug c++/58466] [4.8/4.9 Regression] ICE in cxx_eval_constant_expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58466 --- Comment #2 from Volker Reichelt --- Crash stack trace: PR58466.cc:7:11: internal compiler error: unexpected expression 'C' of kind template_parm_index B> b; ^ 0x6c40ce cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:8197 0x6c7036 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:8217 0x6c9cab maybe_constant_value(tree_node*) ../../gcc/gcc/cp/semantics.c:8327 0x5b164e convert_nontype_argument ../../gcc/gcc/cp/pt.c:5576 0x5b164e convert_template_argument ../../gcc/gcc/cp/pt.c:6453 0x5aa702 coerce_template_parameter_pack ../../gcc/gcc/cp/pt.c:6577 0x5aa702 coerce_template_parms ../../gcc/gcc/cp/pt.c:6776 0x5b327a lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7398 0x5b327a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7695 0x5b894e tsubst_aggr_type ../../gcc/gcc/cp/pt.c:9977 0x5ac34b tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11367 0x5b7f1a tsubst_template_args ../../gcc/gcc/cp/pt.c:9774 0x5ac09f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11672 0x5c6ee0 get_class_bindings ../../gcc/gcc/cp/pt.c:18177 0x5c7ad2 most_specialized_class ../../gcc/gcc/cp/pt.c:18401 0x5d85f0 instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:8687 0x5d85f0 instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9216 0x66445b complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:132 0x555239 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4670 0x57f03d start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4633 Please submit a full bug report, [etc.]
[Bug c++/58637] New: [c++1y] ICE with wrong usage of template<> in front of function containing auto parameter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58637 Bug ID: 58637 Summary: [c++1y] ICE with wrong usage of template<> in front of function containing auto parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid line of code (compiled with "-std=c++1y") triggers an ICE on trunk (since at least 4.9.0-20130920): = template<> void foo(auto); = bug.cc:1:21: internal compiler error: in add_implicit_template_parms, at cp/parser.c:28978 template<> void foo(auto); ^ 0x64f044 add_implicit_template_parms ../../gcc/gcc/cp/parser.c:28978 0x64f044 cp_parser_parameter_declaration_list ../../gcc/gcc/cp/parser.c:18067 0x64f356 cp_parser_parameter_declaration_clause ../../gcc/gcc/cp/parser.c:17882 0x649f04 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:16834 0x649f04 cp_parser_declarator ../../gcc/gcc/cp/parser.c:16705 0x650cc7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16268 0x651fd4 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22665 0x6553fd cp_parser_explicit_specialization ../../gcc/gcc/cp/parser.c:13986 0x65cac5 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10726 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65ce76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ce76 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x7708b3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58646] New: ICEs initializing VLAs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58646 Bug ID: 58646 Summary: ICEs initializing VLAs Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following related 4 code snippets trigger ICEs on trunk in different parts of the compiler: The first one crashes without any compiler options: = void foo(int n) { int a[2][n] = {}; } = bug.cc: In function 'void foo(int)': bug.cc:3:18: internal compiler error: in make_decl_rtl, at varasm.c:1214 int a[2][n] = {}; ^ 0xd24d63 make_decl_rtl(tree_node*) ../../gcc/gcc/varasm.c:1210 0x8a9409 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**) ../../gcc/gcc/expr.c:9320 0x8be7e7 expand_constructor ../../gcc/gcc/expr.c:7713 0x8a9244 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**) ../../gcc/gcc/expr.c:9557 0x8b3158 store_expr(tree_node*, rtx_def*, int, bool) ../../gcc/gcc/expr.c:5207 0x8b5569 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/gcc/expr.c:4853 0x7df05d expand_gimple_stmt_1 ../../gcc/gcc/cfgexpand.c:2274 0x7df05d expand_gimple_stmt ../../gcc/gcc/cfgexpand.c:2370 0x7e0ab3 expand_gimple_basic_block ../../gcc/gcc/cfgexpand.c:4209 0x7e23dc gimple_expand_cfg ../../gcc/gcc/cfgexpand.c:4728 0x7e23dc execute ../../gcc/gcc/cfgexpand.c:4942 Please submit a full bug report, [etc.] The second one crashes if compiled with "-std=c++11": = void foo(int n) { int a[n][2] = {}; } = bug.cc: In function 'void foo(int)': bug.cc:3:18: internal compiler error: in gimplify_init_constructor, at gimplify.c:4236 int a[n][2] = {}; ^ 0x96f293 gimplify_init_constructor ../../gcc/gcc/gimplify.c:4236 0x970a7e gimplify_modify_expr_rhs ../../gcc/gcc/gimplify.c:4518 0x970de4 gimplify_modify_expr ../../gcc/gcc/gimplify.c:4834 0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7332 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x9656fe gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5485 0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7669 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x964f9b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x964f9b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7721 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x964f9b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x964f9b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7721 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x9656fe gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5485 0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7669 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x964f9b gimplify_statement_list ../../gcc/gcc/gimplify.c:1525 0x964f9b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7721 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 Please submit a full bug report, [etc.] The third one also crashes if compiled with "-std=c++11": = void foo(int n) { int a[n][2][n] = {}; } = bug.cc: In function 'void foo(int)': bug.cc:3:21: internal compiler error: in create_tmp_var, at gimplify.c:438 int a[n][2][n] = {}; ^ 0x962923 create_tmp_var(tree_node*, char const*) ../../gcc/gcc/gimplify.c:438 0x9641fc create_tmp_from_val ../../gcc/gcc/gimplify.c:521 0x9641fc lookup_tmp_var ../../gcc/gcc/gimplify.c:543 0x9641fc internal_get_tmp_var ../../gcc/gcc/gimplify.c:587 0x964bae gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8163 0x96bb54 gimplify_compound_lval ../../gcc/gcc/gimplify.c:2257 0x965fa4 gimplify_expr(tree_node**, gimple_statement_d*
[Bug c++/58646] ICEs initializing VLAs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58646 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-valid-code CC||jason at gcc dot gnu.org Known to fail||4.9.0 --- Comment #1 from Volker Reichelt --- Jason, you did some VLA related work for c++1y. Would you mind having a look? Thanks!
[Bug c++/58647] New: [4.7/4.8/4.9 Regression] ICE with function pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58647 Bug ID: 58647 Summary: [4.7/4.8/4.9 Regression] ICE with function pointer Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.7.0 only if compiled with "-std=c++11". Without this option the code compiles fine. == struct A { static void foo(); }; template void bar() { A().foo; } == bug.cc: In function 'void bar()': bug.cc:8:10: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cxx_eval_component_reference, at cp/semantics.c:7145 A().foo; ^ 0xcd96a7 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9348 0x6c55d9 contains_struct_check ../../gcc/gcc/tree.h:2723 0x6c55d9 cxx_eval_component_reference ../../gcc/gcc/cp/semantics.c:7145 0x6c55d9 cxx_eval_constant_expression ../../gcc/gcc/cp/semantics.c:8094 0x6c7036 cxx_eval_outermost_constant_expr ../../gcc/gcc/cp/semantics.c:8217 0x6c9cab maybe_constant_value(tree_node*) ../../gcc/gcc/cp/semantics.c:8327 0x59da21 build_non_dependent_expr(tree_node*) ../../gcc/gcc/cp/pt.c:20960 0x6acbf0 finish_expr_stmt(tree_node*) ../../gcc/gcc/cp/semantics.c:627 0x63d167 cp_parser_statement ../../gcc/gcc/cp/parser.c:9280 0x63e452 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9552 0x63e596 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9506 0x64f95b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18328 0x64f95b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18364 0x6509af cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22351 0x6516d5 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22272 0x6516d5 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16357 0x651fd4 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22665 0x654be8 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22467 0x65c9d9 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10737 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 Please submit a full bug report, [etc.]
[Bug c++/58648] New: [c++11] ICE with variadic template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58648 Bug ID: 58648 Summary: [c++11] ICE with variadic template Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.4.0: template int foo(); int i = foo<0>(); bug.cc:3:16: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst_pack_expansion, at cp/pt.c:9535 int i = foo<0>(); ^ 0xce3195 tree_vec_elt_check_failed(int, int, char const*, int, char const*) ../../gcc/gcc/tree.c:9361 0x5a9fad tree_vec_elt_check ../../gcc/gcc/tree.h:2799 0x5a9fad tsubst_pack_expansion ../../gcc/gcc/cp/pt.c:9535 0x5aac77 coerce_template_parameter_pack ../../gcc/gcc/cp/pt.c:6514 0x5aac77 coerce_template_parms ../../gcc/gcc/cp/pt.c:6776 0x5d1493 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15301 0x53e9bc add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x53a739 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x53a739 add_candidates ../../gcc/gcc/cp/call.c:5075 0x541867 perform_overload_resolution ../../gcc/gcc/cp/call.c:3816 0x5481da build_new_function_call(tree_node*, vec**, bool, int) ../../gcc/gcc/cp/call.c:3893 0x6b4dce finish_call_expr(tree_node*, vec**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2257 0x6417e6 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6009 0x64412d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x644cff cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6451bf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x645616 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x645616 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x6513be cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16530 0x65198f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 Please submit a full bug report, [etc.]
[Bug c++/58649] New: [4.7/4.8/4.9 Regression] ICE with use of enum before declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58649 Bug ID: 58649 Summary: [4.7/4.8/4.9 Regression] ICE with use of enum before declaration Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE since GCC 4.2.0: template void foo() { E(); enum E {}; } template void foo(); bug.cc: In function 'void foo()': bug.cc:3:5: error: there are no arguments to 'E' that depend on a template parameter, so a declaration of 'E' must be available [-fpermissive] E(); ^ bug.cc:3:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) bug.cc: In instantiation of 'void foo() [with = int]': bug.cc:7:24: required from here bug.cc:3:5: error: 'E' was not declared in this scope bug.cc:4:8: internal compiler error: tree check: expected enumeral_type, have error_mark in lookup_template_class_1, at cp/pt.c:7479 enum E {}; ^ 0xcd860a tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x5b3e5d tree_check ../../gcc/gcc/tree.h:2609 0x5b3e5d lookup_template_class_1 ../../gcc/gcc/cp/pt.c:7479 0x5b3e5d lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:7695 0x5b894e tsubst_aggr_type ../../gcc/gcc/cp/pt.c:9977 0x5ac34b tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11367 0x5bd413 tsubst_decl ../../gcc/gcc/cp/pt.c:10752 0x5ac895 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11288 0x5a208c tsubst_expr ../../gcc/gcc/cp/pt.c:13148 0x5a1643 tsubst_expr ../../gcc/gcc/cp/pt.c:13091 0x5a2421 tsubst_expr ../../gcc/gcc/cp/pt.c:13287 0x59fdbf instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19394 0x5dc61f instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19495 0x617896 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4065 Please submit a full bug report, [etc.]
[Bug c++/58650] New: [c++11] ICE with invalid friend declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58650 Bug ID: 58650 Summary: [c++11] ICE with invalid friend declaration Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.0 (when non-static data member initializers were introduced): === struct A { friend int i = 0; }; === bug.cc:3:18: error: 'i' is neither function nor member function; cannot be declared friend friend int i = 0; ^ bug.cc:4:1: internal compiler error: Segmentation fault }; ^ 0xaef7bf crash_signal ../../gcc/gcc/toplev.c:335 0x558397 build_this_parm(tree_node*, int) ../../gcc/gcc/cp/decl.c:7277 0x62bd7d inject_this_parameter ../../gcc/gcc/cp/parser.c:17550 0x635dc7 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19077 0x638230 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19111 0x638230 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14090 0x64d739 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11337 0x6517e9 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10927 0x653810 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x65c83e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10773 0x65b5aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65ce76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ce76 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x7708b3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58651] New: [4.7/4.8/4.9 Regression] ICE with invalid initializer list
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58651 Bug ID: 58651 Summary: [4.7/4.8/4.9 Regression] ICE with invalid initializer list Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=11") triggers an ICE since GCC 4.4.1: == struct A { int i; A(int j) : i{{j}} {} }; A a(0); == bug.cc: In constructor 'A::A(int)': bug.cc:4:19: internal compiler error: in gimplify_init_constructor, at gimplify.c:4236 A(int j) : i{{j}} {} ^ 0x96f293 gimplify_init_constructor ../../gcc/gcc/gimplify.c:4236 0x970a7e gimplify_modify_expr_rhs ../../gcc/gcc/gimplify.c:4518 0x970de4 gimplify_modify_expr ../../gcc/gcc/gimplify.c:4834 0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7332 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x9656fe gimplify_cleanup_point_expr ../../gcc/gcc/gimplify.c:5485 0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7669 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x969e7d gimplify_bind_expr ../../gcc/gcc/gimplify.c:1213 0x965f50 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:7503 0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**) ../../gcc/gcc/gimplify.c:5709 0x96a821 gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.c:8366 0x96acb6 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.c:8498 0x802f37 analyze_function ../../gcc/gcc/cgraphunit.c:636 0x804224 analyze_functions ../../gcc/gcc/cgraphunit.c:1002 0x805739 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2260 0x618920 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4365 Please submit a full bug report, [etc.]
[Bug c++/58664] New: [c++11] ICE initializing array of incomplete type within union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58664 Bug ID: 58664 Summary: [c++11] ICE initializing array of incomplete type within union Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.0 (when non-static data member initializers were introduced): = union U { U u[1] = { 0 }; }; = bug.cc:1:7: internal compiler error: Segmentation fault union U ^ 0xaef9cf crash_signal ../../gcc/gcc/toplev.c:335 0x90292f contains_struct_check ../../gcc/gcc/tree.h:2722 0x90292f size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc/gcc/fold-const.c:1497 0xae7199 place_union_field ../../gcc/gcc/stor-layout.c:1038 0xae7199 place_field(record_layout_info_s*, tree_node*) ../../gcc/gcc/stor-layout.c:1101 0x5e8b3a layout_nonempty_base_or_field ../../gcc/gcc/cp/class.c:4020 0x5f8935 layout_class_type ../../gcc/gcc/cp/class.c:6082 0x60402c finish_struct_1(tree_node*) ../../gcc/gcc/cp/class.c:6419 0x6063b4 finish_struct(tree_node*, tree_node*) ../../gcc/gcc/cp/class.c:6713 0x635a1b cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18903 0x638370 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19111 0x638370 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14090 0x64d879 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11337 0x651929 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10927 0x653950 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x65c97e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10773 0x65b6ea cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65cfb6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cfb6 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x770ac3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58664] [c++11] ICE initializing array of incomplete type within union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58664 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-invalid-code Known to fail||4.7.0, 4.8.0, 4.9.0 --- Comment #1 from Volker Reichelt --- Related to PR58596.
[Bug c++/58665] New: [4.9 Regression] ICE with using incomplete struct
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58665 Bug ID: 58665 Summary: [4.9 Regression] ICE with using incomplete struct Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE on trunk: struct A; template struct B { static void foo(A) {} }; void bar() { B<0>::foo(A()); } bug.cc: In static member function 'static void B< >::foo(A)': bug.cc:5:19: error: '' has incomplete type static void foo(A) {} ^ bug.cc:1:8: error: forward declaration of 'struct A' struct A; ^ bug.cc: In function 'void bar()': bug.cc:10:15: error: invalid use of incomplete type 'struct A' B<0>::foo(A()); ^ bug.cc:1:8: error: forward declaration of 'struct A' struct A; ^ bug.cc: In instantiation of 'static void B< >::foo(A) [with int = 0]': bug.cc:10:9: required from here bug.cc:5:15: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in regenerate_decl_from_template, at cp/pt.c:18839 static void foo(A) {} ^ 0xcd9947 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9348 0x5a04ff contains_struct_check ../../gcc/gcc/tree.h:2723 0x5a04ff regenerate_decl_from_template ../../gcc/gcc/cp/pt.c:18839 0x5a04ff instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19303 0x5dc53f instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19495 0x617966 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4065 Please submit a full bug report, [etc.] The ICE appeared between 4.9.0-20131004 and 4.9.0-20131005.
[Bug c++/58207] [4.7/4.8/4.9 Regression] ICE in sort_constexpr_mem_initializers due to out of bounds vector access
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58207 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-invalid-code Known to work||4.5.0, 4.6.0, 4.7.0, 4.7.1, ||4.7.2 Target Milestone|4.8.2 |4.7.4 Summary|[4.8/4.9 Regression] ICE in |[4.7/4.8/4.9 Regression] |sort_constexpr_mem_initiali |ICE in |zers due to out of bounds |sort_constexpr_mem_initiali |vector access |zers due to out of bounds ||vector access Known to fail||4.7.3, 4.8.0, 4.9.0 --- Comment #4 from Volker Reichelt --- It's actually a regression in GCC 4.7.3.
[Bug c++/58671] New: ICE with thread_local and self-referential variable initialization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58671 Bug ID: 58671 Summary: ICE with thread_local and self-referential variable initialization Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code line(compiled with "-std=c++11") triggers an ICE since GCC 4.8.0 (when thread_local was introduced): == thread_local int i = i; == bug.cc:1:22: internal compiler error: in var_defined_without_dynamic_init, at cp/decl2.c:2836 thread_local int i = i; ^ 0x60966a var_defined_without_dynamic_init ../../gcc/gcc/cp/decl2.c:2836 0x60966a var_needs_tls_wrapper ../../gcc/gcc/cp/decl2.c:2852 0x6164db get_tls_wrapper_fn(tree_node*) ../../gcc/gcc/cp/decl2.c:2950 0x6b612f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc/gcc/cp/semantics.c:3387 0x63fc90 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4539 0x641890 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 0x64405d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x644c2f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6450ef cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x645546 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7987 0x645546 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8197 0x6512ae cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16530 0x65187f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 0x653700 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x65c73e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10773 0x65b4aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65cd76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65cd76 c_parse_file() ../../gcc/gcc/cp/parser.c:28911 0x770903 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58672] New: ICE with thread_local and variable of broken class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58672 Bug ID: 58672 Summary: ICE with thread_local and variable of broken class Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0 (when thread_local was introduced): == struct A { A(int); i; }; thread_local A a(0); == bug.cc:4:3: error: 'i' does not name a type i; ^ bug.cc: In function 'void __tls_init()': bug.cc:7:16: internal compiler error: Segmentation fault thread_local A a(0); ^ 0xaefa5f crash_signal ../../gcc/gcc/toplev.c:335 0x7fa439 cgraph_create_function_alias(tree_node*, tree_node*) ../../gcc/gcc/cgraph.c:565 0x7fa51c cgraph_same_body_alias(cgraph_node*, tree_node*, tree_node*) ../../gcc/gcc/cgraph.c:594 0x617d7b handle_tls_init ../../gcc/gcc/cp/decl2.c:3976 0x617d7b cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4171 Please submit a full bug report, [etc.]
[Bug c++/58674] New: [4.8/4.9 Regression] [c++11] ICE with template using declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58674 Bug ID: 58674 Summary: [4.8/4.9 Regression] [c++11] ICE with template using declaration Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0: template struct A {}; template using B = A; template struct C { B b; }; struct X { static const int i; }; C c; bug.cc: In substitution of 'template using B = A [with int N = X::i]': bug.cc:7:11: required from 'struct C' bug.cc:15:6: required from here bug.cc:7:11: error: the value of 'X::i' is not usable in a constant expression B b; ^ bug.cc:12:20: note: 'X::i' was not initialized with a constant expression static const int i; ^ bug.cc:7:11: note: in template argument for type 'int' B b; ^ bug.cc:7:11: internal compiler error: tree check: expected tree_vec, have error_mark in get_innermost_template_args, at cp/pt.c:569 0xcec8da tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9176 0x587845 tree_check ../../gcc/gcc/tree.h:2609 0x587845 get_innermost_template_args(tree_node*, int) ../../gcc/gcc/cp/pt.c:569 0x5d0585 instantiate_template_1 ../../gcc/gcc/cp/pt.c:15042 0x5d0585 instantiate_template(tree_node*, tree_node*, int) ../../gcc/gcc/cp/pt.c:15117 0x5ac7bb instantiate_alias_template ../../gcc/gcc/cp/pt.c:15147 0x5ac7bb tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11312 0x5bca41 tsubst_decl ../../gcc/gcc/cp/pt.c:10657 0x5ac634 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11285 0x5d8fc1 instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:8952 0x5d8fc1 instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9216 0x66435b complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:132 0x554fa9 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4670 0x57edbd start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4633 0x650fd8 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16453 0x65187f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10995 0x653700 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10876 0x65c73e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10773 0x65b4aa cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10659 0x65cd76 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 Please submit a full bug report, [etc.]
[Bug c++/58700] New: [4.8/4.9 Regression] ICE declaring static bit-field
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58700 Bug ID: 58700 Summary: [4.8/4.9 Regression] ICE declaring static bit-field Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE since GCC 4.8.0: = struct A { static int : 4; }; = bug.cc:3:16: internal compiler error: Segmentation fault static int : 4; ^ 0xb15dff crash_signal ../../gcc/gcc/toplev.c:335 0x5831a7 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc/gcc/cp/decl.c:10642 0x617fcd grokbitfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*, tree_node*) ../../gcc/gcc/cp/decl2.c:1043 0x660ba6 cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20031 0x6402c7 cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:19726 0x6402c7 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:18970 0x6402c7 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19197 0x6402c7 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14144 0x65924f cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11389 0x65fd89 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:10979 0x643860 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10928 0x66aaae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10825 0x6697ca cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10711 0x66b0e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3989 0x66b0e6 c_parse_file() ../../gcc/gcc/cp/parser.c:30962 0x787f73 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] GCC 4.7.x issued a suitable error message instead: bug.cc:3:16: error: static member '' cannot be a bit-field
[Bug c++/58700] [4.8/4.9 Regression] ICE declaring static bit-field
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58700 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-invalid-code Known to work||4.7.0 Target Milestone|--- |4.8.2 Known to fail||4.8.0, 4.9.0
[Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701 Bug ID: 58701 Summary: [4.9 Regression] [c++11] ICE initializing member of static union Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE on trunk (since at least 4.9.0 20130920): === static union { union { int i = 0; }; }; === bug.cc: In constructor 'constexpr::()': bug.cc:2:1: internal compiler error: tree check: accessed operand 2 of indirect_ref with 1 operands in build_anon_member_initialization, at cp/semantics.c:7404 { ^ 0xd201a7 tree_operand_check_failed(int, tree_node const*, char const*, int, char const*) ../../gcc/gcc/tree.c:9499 0x6d2677 tree_operand_check ../../gcc/gcc/tree.h:3109 0x6d2677 build_anon_member_initialization ../../gcc/gcc/cp/semantics.c:7404 0x6d2677 build_data_member_initialization ../../gcc/gcc/cp/semantics.c:7533 0x6d338d build_constexpr_constructor_member_initializers ../../gcc/gcc/cp/semantics.c:7652 0x6d338d massage_constexpr_body ../../gcc/gcc/cp/semantics.c:7752 0x6da9a3 register_constexpr_fundef(tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:7856 0x56ea38 maybe_save_function_definition ../../gcc/gcc/cp/decl.c:13823 0x56ea38 finish_function(int) ../../gcc/gcc/cp/decl.c:13944 0x6acc19 synthesize_method(tree_node*) ../../gcc/gcc/cp/method.c:809 0x61e379 mark_used(tree_node*, int) ../../gcc/gcc/cp/decl2.c:4778 0x54d0b6 build_over_call ../../gcc/gcc/cp/call.c:7116 0x548eae build_new_method_call_1 ../../gcc/gcc/cp/call.c:7813 0x548eae build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7883 0x549e22 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../gcc/gcc/cp/call.c:7440 0x69eba7 expand_default_init ../../gcc/gcc/cp/init.c:1668 0x69eba7 expand_aggr_init_1 ../../gcc/gcc/cp/init.c:1769 0x6a1779 build_aggr_init(tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/init.c:1520 0x55e005 build_aggr_init_full_exprs ../../gcc/gcc/cp/decl.c:5552 0x55e005 check_initializer ../../gcc/gcc/cp/decl.c:5687 Please submit a full bug report, [etc.]
[Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701 Volker Reichelt changed: What|Removed |Added Known to work||4.7.0, 4.8.0 Target Milestone|--- |4.9.0 Known to fail||4.9.0
[Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702 Bug ID: 58702 Summary: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-fopenmp") triggers an ICE on trunk: = void foo() { x; #pragma omp parallel for reduction(+:x) for (int i = 0; i < 10; ++i) ; } = bug.cc: In function 'void foo()': bug.cc:3:3: error: 'x' was not declared in this scope x; ^ bug.cc:4:40: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_reduction_clause, at cp/semantics.c:4966 #pragma omp parallel for reduction(+:x) ^ 0xd14f79 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9351 0x6df624 tree_class_check ../../gcc/gcc/tree.h:2797 0x6df624 finish_omp_reduction_clause ../../gcc/gcc/cp/semantics.c:4966 0x6df624 finish_omp_clauses(tree_node*) ../../gcc/gcc/cp/semantics.c:5709 0x634b1e cp_omp_split_clauses ../../gcc/gcc/cp/parser.c:28967 0x66873e cp_parser_omp_for ../../gcc/gcc/cp/parser.c:29079 0x668c4b cp_parser_omp_parallel ../../gcc/gcc/cp/parser.c:29259 0x63f221 cp_parser_omp_construct ../../gcc/gcc/cp/parser.c:30380 0x63f221 cp_parser_pragma ../../gcc/gcc/cp/parser.c:30885 0x64555c cp_parser_statement ../../gcc/gcc/cp/parser.c:9297 0x646342 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9604 0x646486 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9558 0x659b0b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18401 0x659b0b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18437 0x65df0f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22444 0x65ece2 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22365 0x65ece2 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16412 0x65ff2f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11047 0x643860 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10928 0x66aaae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10825 Please submit a full bug report, [etc.] The regression was introduced between 2013-10-09 and 2013-10-11.
[Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702 Volker Reichelt changed: What|Removed |Added Keywords||error-recovery, ||ice-on-invalid-code, openmp Known to work||4.8.0 Target Milestone|--- |4.9.0 Known to fail||4.9.0
[Bug c++/58703] New: [4.9 Regression] ICE with invalid types in OpenMP declare reduction clause
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58703 Bug ID: 58703 Summary: [4.9 Regression] ICE with invalid types in OpenMP declare reduction clause Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-fopenmp") triggers an ICE on trunk: #pragma omp declare reduction (+ : char[] : omp_out += omp_in) #pragma omp declare reduction (+ : char() : omp_out += omp_in) bug.cc:1:36: error: function or array type 'char []' in '#pragma omp declare reduction' #pragma omp declare reduction (+ : char[] : omp_out += omp_in) ^ bug.cc:2:36: error: function or array type 'char()' in '#pragma omp declare reduction' #pragma omp declare reduction (+ : char() : omp_out += omp_in) ^ bug.cc:2:63: internal compiler error: in cp_parser_translation_unit, at cp/parser.c:4019 #pragma omp declare reduction (+ : char() : omp_out += omp_in) ^ 0x66b3b0 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4018 0x66b3b0 c_parse_file() ../../gcc/gcc/cp/parser.c:30962 0x787f73 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58703] [4.9 Regression] ICE with invalid types in OpenMP declare reduction clause
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58703 Volker Reichelt changed: What|Removed |Added Keywords||error-recovery, ||ice-on-invalid-code Target Milestone|--- |4.9.0 Known to fail||4.9.0
[Bug c++/58704] New: [c++11] ICE initializing array member of template class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58704 Bug ID: 58704 Summary: [c++11] ICE initializing array member of template class Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.0 (when non-static data member initializers were introduced): = struct A {}; template struct B { A a[1] = {}; }; B b; = bug.cc: In constructor 'constexpr B::B()': bug.cc:3:27: internal compiler error: tree check: expected tree that contains 'common' structure, have 'constructor' in perform_member_init, at cp/init.c:665 template struct B ^ 0xd159c7 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9472 0x6a3e2d contains_struct_check ../../gcc/gcc/tree.h:2788 0x6a3e2d perform_member_init ../../gcc/gcc/cp/init.c:665 0x6a3e2d emit_mem_initializers(tree_node*) ../../gcc/gcc/cp/init.c:1096 0x6acfae synthesize_method(tree_node*) ../../gcc/gcc/cp/method.c:796 0x61e379 mark_used(tree_node*, int) ../../gcc/gcc/cp/decl2.c:4778 0x54d0b6 build_over_call ../../gcc/gcc/cp/call.c:7116 0x548eae build_new_method_call_1 ../../gcc/gcc/cp/call.c:7813 0x548eae build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7883 0x549e22 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../gcc/gcc/cp/call.c:7440 0x69eba7 expand_default_init ../../gcc/gcc/cp/init.c:1668 0x69eba7 expand_aggr_init_1 ../../gcc/gcc/cp/init.c:1769 0x6a1779 build_aggr_init(tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/init.c:1520 0x55e005 build_aggr_init_full_exprs ../../gcc/gcc/cp/decl.c:5552 0x55e005 check_initializer ../../gcc/gcc/cp/decl.c:5687 0x570ccc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6356 0x65e7e7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16633 0x65ff2f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11047 0x643860 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10928 0x66aaae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10825 Please submit a full bug report, [etc.]
[Bug c++/58705] [4.7/4.8/4.9 Regression] [c++11] ICE with invalid initializer for _Complex variable
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58705 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-invalid-code Known to work||4.6.0 Target Milestone|--- |4.7.4 Known to fail||4.7.0, 4.8.0, 4.9.0
[Bug c++/58705] New: [4.7/4.8/4.9 Regression] [c++11] ICE with invalid initializer for _Complex variable
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58705 Bug ID: 58705 Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with invalid initializer for _Complex variable Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.0: === _Complex float f = {{}}; === bug.cc:1:23: internal compiler error: Segmentation fault _Complex float f = {{}}; ^ 0xb15dff crash_signal ../../gcc/gcc/toplev.c:335 0x5e6d15 vec::operator[](unsigned int) ../../gcc/gcc/vec.h:827 0x5e6d15 check_narrowing(tree_node*, tree_node*) ../../gcc/gcc/cp/typeck2.c:836 0x55e437 check_initializer ../../gcc/gcc/cp/decl.c:5669 0x570ccc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6356 0x65e7e7 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16633 0x65ff2f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11047 0x643860 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10928 0x66aaae cp_parser_declaration ../../gcc/gcc/cp/parser.c:10825 0x6697ca cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10711 0x66b0e6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3989 0x66b0e6 c_parse_file() ../../gcc/gcc/cp/parser.c:30962 0x787f73 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]
[Bug c++/58706] New: ICE with lambda in OpenMP for-loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58706 Bug ID: 58706 Summary: ICE with lambda in OpenMP for-loop Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11 -fopenmp") triggers an ICE since GCC 4.5.0 (when lambdas were introduced): === template void foo() { #pragma omp for for (T i = [](){ return 0; }(); i < 10; ++i) ; } void bar() { foo(); } === bug.cc: In instantiation of 'void foo() [with T = int]': bug.cc:10:12: required from here bug.cc:3:9: internal compiler error: Segmentation fault #pragma omp for ^ 0xb15dff crash_signal ../../gcc/gcc/toplev.c:335 0x6cabd2 contains_struct_check ../../gcc/gcc/tree.h:2787 0x6cabd2 finish_omp_for(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:6321 0x5aae3d tsubst_expr ../../gcc/gcc/cp/pt.c:13596 0x5a9db7 tsubst_expr ../../gcc/gcc/cp/pt.c:13384 0x5a6d69 instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19603 0x5e4c6f instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19715 0x6204c6 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4121 Please submit a full bug report, [etc.]
[Bug c++/58814] New: [4.7/4.8/4.9 Regression] ICE with volatile and attribute vector_size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58814 Bug ID: 58814 Summary: [4.7/4.8/4.9 Regression] ICE with volatile and attribute vector_size Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.7.0: volatile int i __attribute__((vector_size(8))); void foo() { i += i; } bug.cc: In function 'void foo()': bug.cc:5:5: internal compiler error: in stabilize_expr, at cp/tree.c:3769 i += i; ^ 0x6ef1fe stabilize_expr(tree_node*, tree_node**) ../../gcc/gcc/cp/tree.c:3769 0x68c9f4 cp_build_modify_expr(tree_node*, tree_code, tree_node*, int) ../../gcc/gcc/cp/typeck.c:7362 0x556885 build_new_op_1 ../../gcc/gcc/cp/call.c:5438 0x556f57 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/gcc/cp/call.c:5513 0x68e09d build_x_modify_expr(unsigned int, tree_node*, tree_code, tree_node*, int) ../../gcc/gcc/cp/typeck.c:7534 0x651220 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8032 0x653523 cp_parser_expression ../../gcc/gcc/cp/parser.c:8158 0x653d2e cp_parser_expression ../../gcc/gcc/cp/parser.c:8197 0x653d2e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9488 0x648fd7 cp_parser_statement ../../gcc/gcc/cp/parser.c:9339 0x64a2c2 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9611 0x64a406 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9565 0x65da5b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18408 0x65da5b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18444 0x661e5f cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22452 0x662c32 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22373 0x662c32 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16419 0x663e7f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11054 0x6477e0 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10935 0x66e9fe cp_parser_declaration ../../gcc/gcc/cp/parser.c:10832 Please submit a full bug report, [etc.]
[Bug c++/58814] [4.7/4.8/4.9 Regression] ICE with volatile and attribute vector_size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58814 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-valid-code Known to work||4.5.0, 4.6.0 Target Milestone|--- |4.7.4 Known to fail||4.7.0, 4.8.0, 4.9.0
[Bug c++/58834] New: [4.9 Regression] ICE on __builtin_shuffle within template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58834 Bug ID: 58834 Summary: [4.9 Regression] ICE on __builtin_shuffle within template function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE on trunk (since at least GCC 4.9.0 20130920): = template void foo() { int i __attribute__((vector_size(8))); __builtin_shuffle(i, i); } = bug.cc: In function 'void foo()': bug.cc:4:25: internal compiler error: Segmentation fault __builtin_shuffle(i, i); ^ 0xb16cef crash_signal ../../gcc/gcc/toplev.c:335 0x59bb7a identifier_p ../../gcc/gcc/cp/cp-tree.h:255 0x59bb7a type_dependent_expression_p(tree_node*) ../../gcc/gcc/cp/pt.c:20517 0x677b70 build_x_vec_perm_expr(unsigned int, tree_node*, tree_node*, tree_node*, int) ../../gcc/gcc/cp/typeck.c:4945 0x64e2f0 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5763 0x6506fd cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7066 0x6512cf cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7758 0x6517af cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7996 0x653c93 cp_parser_expression ../../gcc/gcc/cp/parser.c:8158 0x65449e cp_parser_expression ../../gcc/gcc/cp/parser.c:8197 0x65449e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9488 0x649737 cp_parser_statement ../../gcc/gcc/cp/parser.c:9339 0x64aa22 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9611 0x64ab66 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9565 0x65e1cb cp_parser_function_body ../../gcc/gcc/cp/parser.c:18408 0x65e1cb cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18444 0x6625df cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22452 0x6633b2 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22373 0x6633b2 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16419 0x663754 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22766 Please submit a full bug report, [etc.]
[Bug c++/58834] [4.9 Regression] ICE on __builtin_shuffle within template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58834 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-valid-code Known to work||4.8.0, 4.8.2 Target Milestone|--- |4.9.0 Known to fail||4.9.0
[Bug c++/58835] New: [4.7/4.8/4.9 Regression] ICE with __PRETTY_FUNCTION__ in broken function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58835 Bug ID: 58835 Summary: [4.7/4.8/4.9 Regression] ICE with __PRETTY_FUNCTION__ in broken function Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet triggers an ICE since GCC 4.1.0: = struct A { int i; template void foo() : i(__PRETTY_FUNCTION__) {} }; = bug.cc: In member function 'void A::foo()': bug.cc:4:35: error: only constructors take member initializers template void foo() : i(__PRETTY_FUNCTION__) {} ^ bug.cc:4:37: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in finish_fname, at cp/semantics.c:2540 template void foo() : i(__PRETTY_FUNCTION__) {} ^ 0xd17204 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/gcc/tree.c:9473 0x6c8723 contains_struct_check ../../gcc/gcc/tree.h:2788 0x6c8723 finish_fname(tree_node*) ../../gcc/gcc/cp/semantics.c:2540 0x64ce78 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4370 0x64df70 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5865 0x6506fd cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7066 0x6512cf cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7758 0x6517af cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7996 0x652f38 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8046 0x652f38 cp_parser_parenthesized_expression_list ../../gcc/gcc/cp/parser.c:6584 0x65e461 cp_parser_mem_initializer ../../gcc/gcc/cp/parser.c:12216 0x65e461 cp_parser_mem_initializer_list ../../gcc/gcc/cp/parser.c:12100 0x65e461 cp_parser_ctor_initializer_opt ../../gcc/gcc/cp/parser.c:12069 0x65e461 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18429 0x6625df cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22452 0x669e30 cp_parser_late_parsing_for_member ../../gcc/gcc/cp/parser.c:23117 0x645391 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19180 0x645391 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19204 0x645391 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14151 0x65d90f cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11396 Please submit a full bug report, [etc.]
[Bug c++/58836] New: ICE with wrong usage of initializer list in non-type template argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58836 Bug ID: 58836 Summary: ICE with wrong usage of initializer list in non-type template argument Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++11" or "-std=c++0x" for older compilers) triggers an ICE since GCC 4.4.0 (when initializer lists were introduced): === template struct A; template struct A {}; A a; === bug.cc:5:11: internal compiler error: in unify, at cp/pt.c:17829 A a; ^ 0x5d22ef unify ../../gcc/gcc/cp/pt.c:17829 0x5d158b unify ../../gcc/gcc/cp/pt.c:17651 0x5d387e get_class_bindings ../../gcc/gcc/cp/pt.c:18378 0x5d44ea most_specialized_class ../../gcc/gcc/cp/pt.c:18623 0x5e52f0 instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:8704 0x5e52f0 instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:9236 0x676d9b complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:132 0x5601b9 start_decl_1(tree_node*, bool) ../../gcc/gcc/cp/decl.c:4679 0x589ef1 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/gcc/cp/decl.c:4642 0x662d1a cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16514 0x6645ff cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11054 0x647f80 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10935 0x66f17e cp_parser_declaration ../../gcc/gcc/cp/parser.c:10832 0x66de9a cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10718 0x66f7b6 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3990 0x66f7b6 c_parse_file() ../../gcc/gcc/cp/parser.c:30970 0x78c623 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]