Re: RFA (tree.c): PATCH for c++/68782 (wrong TREE_CONSTANT flag on C++ CONSTRUCTOR)

2016-01-26 Thread Jakub Jelinek
On Tue, Jan 26, 2016 at 03:46:50PM -0500, Jason Merrill wrote: > On 01/26/2016 03:32 PM, Jakub Jelinek wrote: > >>>+if (CHECKING_P) > >>>+ verify_constructor_flags (t); > >>>+else > >>>+ recompute_constructor_flags (t); > > >But I don't understand this. Either the flags are supp

Re: RFA (tree.c): PATCH for c++/68782 (wrong TREE_CONSTANT flag on C++ CONSTRUCTOR)

2016-01-26 Thread Jason Merrill
On 01/26/2016 03:32 PM, Jakub Jelinek wrote: >+ if (CHECKING_P) >+ verify_constructor_flags (t); >+ else >+ recompute_constructor_flags (t); But I don't understand this. Either the flags are supposed to be already correct here, then I'd expect to see if (CHECKING_P)

Re: RFA (tree.c): PATCH for c++/68782 (wrong TREE_CONSTANT flag on C++ CONSTRUCTOR)

2016-01-26 Thread Jakub Jelinek
On Tue, Jan 26, 2016 at 03:20:04PM -0500, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu. Are the tree.c changes OK for trunk? The tree.c changes are ok. But I have nits and one bigger issue in constexpr.c: > --- a/gcc/cp/constexpr.c > +++ b/gcc/cp/constexpr.c > @@ -2214,6 +2214,9 @@ cxx_eval

RFA (tree.c): PATCH for c++/68782 (wrong TREE_CONSTANT flag on C++ CONSTRUCTOR)

2016-01-26 Thread Jason Merrill
The problem in this bug was that the constexpr code builds a lot of CONSTRUCTORs and then fills in the elements later without ever going back and updating TREE_CONSTANT and TREE_SIDE_EFFECTS. This patch adds middle end functions recompute_constructor_flags and verify_constructor_flags, and fix