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: Fix PR 19643. [ Was Re: Speedup CSE by 5% ]


On Sat, 2005-01-29 at 20:06 +0530, Ranjit Mathew wrote:
> Roger Sayle wrote:
> > Hi Jeff,
> [...]
> >>This fixes PR 19643 in the obvious way.
> > 
> > 
> > Alas, not so "obvious" as this is clearly incorrect.
I'm clearly a moron.

> > 
> > I'm still investigating possible java front-end interactions and
> > whether gcj/bytecode requires the evaluation of "0 % 0" to throw
> > a java.lang.ArithmeticException.
> 
> Indeed this causes a Jacks testsuite regression for GCJ.
> Specifically testcase 15.28-div0-2.
> 
> Since "0 % 0" is undefined, it is not a compile-time constant
> expression and must be complained about.
> 
> In fact, this is a regression even for C w.r.t. GCC 3.4.3:
> 
> /tmp > cat x.c
> int foo(int x)
> {
>   switch(x)
>   {
>   case 0 % 0:
>     return 1;
>   default:
>     return 2;
>   }
> }
Yea.  I added this to pr19723.  I'm testing a fix for both problems.

jeff



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