[Bug c++/17972] [3.4 Regression] const/pure functions result in bad asm

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 3 21:12:00 GMT 2005


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-03 21:12 -------
> I don't think I'd try to be that clever.  We might want the 
> stabilization to occur even in other cases.  In looking at it more 
> closely, it definitely looks like stabilize_reference should deal with 
> CALL_EXPRs.

But then what's the difference with setting TREE_SIDE_EFFECTS on CALL_EXPRs?
Also for 3.4.x some FE don't use tree inlining at all so I don't think they
should be penalized because of the C++ FE.

> (I guess I was thinking that the problem with the duplicate labels could 
> be avoided in the inliner by generating fresh labels.  But, maybe that's 
> not going to work for other reasons.)

How would you do that exactly?  In our present case, the inliner inlines exactly
one CALL_EXPR, but it is referenced twice in another tree.


-- 


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



More information about the Gcc-bugs mailing list