------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-03 
22:02 -------
> There are other places where TREE_SIDE_EFFECTS matters.  (Like, "do we 
> have to emit this expression at all, if its result is not used?")

OK.

> The counter to your argument is that I don't see why the C++ front end 
> should be penalized because other front ends have a workaround for what 
> seems to be a bug in the middle end.

Agreed.  But I also think that the FEs that don't use tree inlining cannot even
remotely be affected by the problem, so certainly shouldn't be penalized either.

> The stated purpose for stabilize_reference is to make it possible to use 
> an expression more than once.  If CALL_EXPRs can't be used more than 
> once (which your research would seem to prove), then it seems like 
> stabilize_reference should handle that.

Sure, but I think CALL_EXPRs without TREE_SIDE_EFFECTS can be reused more than
once, once tree inlining is done, if they happen not to have been inlined.  At
least we don't have counter-examples yet.

> OK, I'm confused, then -- I think that either we have to fix this 
> problem in stabilize_reference (which seems better to me) or always set 
> TREE_SIDE_EFFECTS on CALL_EXPRs in build3.

stabilize_reference is fine with me.  We now only have to settle on the
granularity of the change.


-- 


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

Reply via email to