Commit bf4ccdd6 by Richard Henderson Committed by Richard Henderson

stor-layout.c (round_up): Check for 0/1 before dividing.

        * stor-layout.c (round_up): Check for 0/1 before dividing.
        (round_down): Likewise.

From-SVN: r85792
parent 7109c195
2004-08-10 Richard Henderson <rth@redhat.com>
* stor-layout.c (round_up): Check for 0/1 before dividing.
(round_down): Likewise.
* tree-tailcall.c (suitable_for_tail_opt_p): Also check DECL_EXTERNAL.
2004-08-09 Mark Mitchell <mark@codesourcery.com>
......
......@@ -277,6 +277,11 @@ round_up (tree value, int divisor)
{
tree t;
if (divisor == 0)
abort ();
if (divisor == 1)
return value;
/* If divisor is a power of two, simplify this to bit manipulation. */
if (divisor == (divisor & -divisor))
{
......@@ -302,6 +307,11 @@ round_down (tree value, int divisor)
{
tree t;
if (divisor == 0)
abort ();
if (divisor == 1)
return value;
/* If divisor is a power of two, simplify this to bit manipulation. */
if (divisor == (divisor & -divisor))
{
......
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