On Mon, Mar 9, 2009 at 2:21 PM, Martin Jambor <mjam...@suse.cz> wrote: > Hi, > > The description of TREE_ADDRESSABLE macro in tree.h says: > > "In ..._TYPE nodes, it means that objects of this type must > be fully addressable. This means that pieces of this > object cannot go into register parameters, for example." > > Yet the current tree-sra does not check this flag and happily > scalarizes variables of such types, there are even tests in our > regression testsuite that check whether such types are indeed reduced > (such as g++.dg/tree-ssa/ssa-sra-1.C). > > Moreover, such types are very common in C++, the one in the testcase > mentioned above is even quite simple. > > On a related note, is the assert in create_tmp_var() checking this > addressability the requested type really necessary?
Yes, we really don't want to create a temporary variable of this type because they need to be constructed and deconstructed. > > Is the comment outdated? Or have we been somehow lucky all this time > while ignoring a sensible requirement? The comment is semi correct, it is more talking about the type has to be fully addressable if used fully but really can be scalarised if used only locally in the function. Thanks, Andrew Pinski