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

Re: [PATCH] Fix PR optimization/11381


On Wed, 2003-07-02 at 01:04, Eric Botcazou wrote:
> Hi,
> 
> This is a regression from GCC 3.2.3, present on 3.3 branch and mainline.
> 
> The optimizer (more precisely, the RTL simplifier) may discard volatile 
> comparisons in some cases, because it forgets to check that the operands 
> have no side-effects. The fix is then straightforward.
> 
> Bootstrapped/regtested on i586-redhat-linux-gnu (3.3 branch except Ada). Ok 
> for mainline and 3.3 branch?

Yes.

(It's interesting that -- even in the side-effects case -- we still know
the *answer*; it's just that we should still evaluate the two
expressions.  That suggests that the interface to
simplify_relational_operation is suboptimal; it should give back some
code to evaluate and/or an answer.  Oh, well.)

Thanks!

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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