------- Comment #3 from jamborm at gcc dot gnu dot org 2010-06-04 16:42 ------- Thanks for a nice testcase. I've been looking at this briefly today and so far I am inclined to say that this is not SRA's fault. First, I have identified the function that is miscompiled (boost::detail::function::basic_vtable4<R, T0, T1, T2, T3>::assign_to) and the transformation there is very simple and looks OK.
Furthermore, the testcase does not miscompile on the current trunk and the output of SRA on the trunk and on the branch is exactly the same. I'll continue looking at this next week. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44406