This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

copy_tree_r and STATEMENT_LIST (was Re: C++ PATCHes relating to c++/48834, c++/40975 (array new))


On 05/04/2011 06:57 PM, Eric Botcazou wrote:
But you're unilaterally choosing one special handling (copying) among several
ones (copying, not copying, aborting) just because of one caller, for no good
reason IMO.

It seems pretty straightforward to me that a function named copy_tree_r should copy everything that isn't always shared (like decls). It already copies SAVE_EXPR, after all; how is copying STATEMENT_LIST going to cause trouble in a context where copying SAVE_EXPR isn't?


This is how things used to work before, but it broke when the tree-ssa
merge switched from using TREE_CHAIN on statements to a separate
STATEMENT_LIST.

Well, the assertion certainly wasn't put there by accident.

No, but the rationale isn't documented. It was added by the patch that introduced STATEMENT_LIST,


http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00879.html

but doesn't appear in the ChangeLog entry. I notice that in that patch unsave_r copied STATEMENT_LIST, but now it doesn't. rth, do you happen to remember why you put it there?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]