This is the mail archive of the gcc-bugs@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]

[Bug middle-end/28116] [4.1 Regression] ICE when building konverter with gcc-4.1 with -O3 [RSO]



------- Comment #5 from jakub at gcc dot gnu dot org  2006-06-22 16:58 -------
In GCC trunk bootstrap + regression testing the tree-nrv optimization hits 584
types, out of this 38 cases have TREE_ADDRESSABLE set on the RESULT_DECL
(because C++ FE already NRV optimized it, address of <retval> was taken usually
when it was constructed, then some optimizations later on set <retval> to
a temporary variable and the code that takes &<result> was optimized out), e.g.
when compiling fstream-inst.cc in libstdc++-v3.
So, bailing out in tree_nrv whenever TREE_ADDRESSABLE (result) would pessimize
those.  On the other side, in tree_nrv we know that TREE_ADDRESSABLE (found) ==
0 (we check for that), so we can either stop copying the addressable flag, or
bail if TREE_ADDRESSABLE (result).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28116


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