Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-12 Thread Jason Merrill
On 01/12/2012 09:21 AM, Dodji Seketeli wrote: This is the udpated patch that I have tested and am about to bootstrap. OK. Jason

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-12 Thread Dodji Seketeli
Jason Merrill writes: > On 01/11/2012 05:57 PM, Dodji Seketeli wrote: >> + list = cur_stmt_list; >> if (TREE_CODE (list) == BIND_EXPR) >> list = BIND_EXPR_BODY (list); >> if (TREE_CODE (list) == STATEMENT_LIST > > cur_stmt_list should always be a STATEMENT_LIST, so these

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-12 Thread Jason Merrill
On 01/11/2012 05:57 PM, Dodji Seketeli wrote: + list = cur_stmt_list; if (TREE_CODE (list) == BIND_EXPR) list = BIND_EXPR_BODY (list); if (TREE_CODE (list) == STATEMENT_LIST cur_stmt_list should always be a STATEMENT_LIST, so these tests are unnecessary. Jason

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-11 Thread Dodji Seketeli
Paolo Carlini writes: > ... watch out trailing blank lines ;) Hopefully fixed below. Thanks for watching. gcc/cp/ * semantics.c (cp_parser_ctor_initializer_opt_and_function_body): Set the pointer to the last block of the constructor to the current statement. (b

Re: [PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-11 Thread Paolo Carlini
... watch out trailing blank lines ;) Thanks! Paolo

[PATCH] PR c++/51633 - ICEs with constexpr constructor

2012-01-11 Thread Dodji Seketeli
Hello, Consider this short code snippet: struct A { ~A(); }; struct B { A a; constexpr B() {} }; As explained in the audit trail, this is valid code. G++ ICEs on it because build_constexpr_constructor_member_initializers chokes on a CLEANUP_STMT.