Commit 01c0a9fa by Andrew Pinski Committed by Andrew Pinski

[multiple changes]

2005-07-15  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/22398
        * gcc.c-torture/compile/pr22398.c: New test.

2005-07-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/22398
        * fold-const.c (build_range_check): Convert high/low to etype
        if we are only comparing against exp.

From-SVN: r102067
parent 3f774254
2005-07-11 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/22398
* fold-const.c (build_range_check): Convert high/low to etype
if we are only comparing against exp.
2005-07-13 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/22376
......
......@@ -3943,13 +3943,16 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high)
return fold_convert (type, integer_one_node);
if (low == 0)
return fold_build2 (LE_EXPR, type, exp, high);
return fold_build2 (LE_EXPR, type, exp,
fold_convert (etype, high));
if (high == 0)
return fold_build2 (GE_EXPR, type, exp, low);
return fold_build2 (GE_EXPR, type, exp,
fold_convert (etype, low));
if (operand_equal_p (low, high, 0))
return fold_build2 (EQ_EXPR, type, exp, low);
return fold_build2 (EQ_EXPR, type, exp,
fold_convert (etype, low));
if (integer_zerop (low))
{
......
2005-07-15 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/22398
* gcc.c-torture/compile/pr22398.c: New test.
2005-07-15 Mark Mitchell <mark@codesourcery.com>
PR c++/22132
......
#if ULONG_MAX != 4294967295u && ULONG_MAX != 18446744073709551615ull
int main(void) { exit (0); }
#else
#if ULONG_MAX != 18446744073709551615ull
#define NUM 0xf0000000
#else
#define NUM 0xf000000000000000
#endif
int func1(void *rw)
{
return (rw && (((unsigned long) rw) >= NUM) );
}
void func2(void *rw)
{
while(rw && (((unsigned long) rw) >= NUM) ) {}
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment