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: [tree-ssa] Trivial bugfix and fix optimization/2806


Hi Jeff,

> void foo(int edx, int eax)
> {
>   if (eax == 65535)
>     {
>       if (edx == 1)
>         {
>           abarney[0] = 5;
>           abarney[1] = 6;
>         }
>     }
>   if (eax == 65535)
>     {
>       if (-- edx == 0)
>         afred[0] = 2;
>     }
> }

Could we replace 65535 in gcc.dg/tree-ssa/20040305-1.c with 100 or
something?  The reason is because 65535 would cause

  warning: comparison is always false due to limited range of data type

on 16-bit targets.  In this case, the purpose of the test is very
clear, so changing magic numbers shouldn't be a problem.  I thought
about adding dg-xfail, dg-options, etc, but they are a bit ugly.

Kazu Hirata


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