Bug 63194 - [5 Regression] ICE in maybe_explain_implicit_delete, at cp/method.c:1552
Summary: [5 Regression] ICE in maybe_explain_implicit_delete, at cp/method.c:1552
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2014-09-06 13:10 UTC by Markus Trippelsdorf
Modified: 2014-10-12 01:09 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.8.3, 4.9.0
Known to fail: 5.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2014-09-06 13:10:57 UTC
Reduced from a huge boost testcase:

markus@x4 tmp % cat horzcollisionbar.ii
template <int>
class A {
 public:
  A() noexcept(noexcept(0)) = default;
};
class B {
  A<0> m_points;
};
void fn1(A<0>, A<0>) { B(); }

markus@x4 tmp % g++ -c -std=c++11 horzcollisionbar.ii
horzcollisionbar.ii: In function ‘void fn1(A<0>, A<0>)’:
horzcollisionbar.ii:9:26: error: use of deleted function ‘B::B()’
 void fn1(A<0>, A<0>) { B(); }
                          ^
horzcollisionbar.ii:6:7: note: ‘B::B()’ is implicitly deleted because the default definition would be ill-formed:
 class B {
       ^
horzcollisionbar.ii:6:7: error: use of deleted function ‘A<<anonymous> >::A() [with int <anonymous> = 0]’
horzcollisionbar.ii:4:3: internal compiler error: in maybe_explain_implicit_delete, at cp/method.c:1552
   A() noexcept(noexcept(0)) = default;
   ^
0x6ea0d8 maybe_explain_implicit_delete(tree_node*)
        ../../gcc/gcc/cp/method.c:1552
0x653df0 mark_used(tree_node*, int)
        ../../gcc/gcc/cp/decl2.c:4877
0x57233e build_over_call
        ../../gcc/gcc/cp/call.c:7019
0x57df65 build_new_method_call_1
        ../../gcc/gcc/cp/call.c:8098
0x57df65 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int)
        ../../gcc/gcc/cp/call.c:8168
0x6e00ef locate_fn_flags
        ../../gcc/gcc/cp/method.c:906
0x6e2eca walk_field_subobs
        ../../gcc/gcc/cp/method.c:1193
0x6e3a34 synthesized_method_walk
        ../../gcc/gcc/cp/method.c:1435
0x6e9f7f maybe_explain_implicit_delete(tree_node*)
        ../../gcc/gcc/cp/method.c:1541
0x653df0 mark_used(tree_node*, int)
        ../../gcc/gcc/cp/decl2.c:4877
0x572cc2 build_over_call
        ../../gcc/gcc/cp/call.c:7381
0x57df65 build_new_method_call_1
        ../../gcc/gcc/cp/call.c:8098
0x57df65 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int)
        ../../gcc/gcc/cp/call.c:8168
0x57eed9 build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int)
        ../../gcc/gcc/cp/call.c:7712
0x6d83ab build_value_init(tree_node*, int)
        ../../gcc/gcc/cp/init.c:350
0x620e74 build_functional_cast(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck2.c:1928
0x687643 cp_parser_functional_cast
        ../../gcc/gcc/cp/parser.c:23581
0x68118b cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5936
0x683e73 cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7287
0x684c38 cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:8030
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Started with r203989.
Comment 1 Markus Trippelsdorf 2014-09-06 13:20:35 UTC
Actually gcc-4.9 compiles the testcase without any warning.
Comment 2 Markus Trippelsdorf 2014-09-10 10:59:17 UTC
Actually started with r209907 aka DR 1351.
Comment 3 Jason Merrill 2014-10-11 02:27:06 UTC
Author: jason
Date: Sat Oct 11 02:26:33 2014
New Revision: 216114

URL: https://gcc.gnu.org/viewcvs?rev=216114&root=gcc&view=rev
Log:
	PR c++/63194
	* method.c (defaulted_late_check): Call maybe_instantiate_noexcept.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/noexcept25.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/method.c
Comment 4 Jason Merrill 2014-10-12 01:09:16 UTC
Fixed.