Commit 0a71919d by Falk Hueffner Committed by Richard Henderson

re PR target/9164 ([Alpha] improper code generation)

        PR target/9164
        * tree.c (get_narrower): For extensions with unchanged bit number,
        return the unsignedness of the outer mode.

        * gcc.c-torture/execute/20030316-1.c: New test case.

From-SVN: r64440
parent 1f5a253a
2003-03-16 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
PR target/9164
* tree.c (get_narrower): For extensions with unchanged bit number,
return the unsignedness of the outer mode.
2003-03-16 Roger Sayle <roger@eyesopen.com>
* c-typeck.c (build_component_ref): Turn "for" into "do .. while"
......
2003-03-16 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* gcc.c-torture/execute/20030316-1.c: New test case.
2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9629
......
/* PR target/9164 */
/* The comparison operand was sign extended erraneously. */
int
main (void)
{
long j = 0x40000000;
if ((unsigned int) (0x40000000 + j) < 0L)
abort ();
return 0;
}
......@@ -3958,10 +3958,10 @@ get_narrower (op, unsignedp_ptr)
/* See what's inside this conversion. If we decide to strip it,
we will set WIN. */
op = TREE_OPERAND (op, 0);
if (bitschange > 0)
{
op = TREE_OPERAND (op, 0);
/* An extension: the outermost one can be stripped,
but remember whether it is zero or sign extension. */
if (first)
......@@ -3980,6 +3980,7 @@ get_narrower (op, unsignedp_ptr)
if (first)
uns = TREE_UNSIGNED (TREE_TYPE (op));
first = 0;
op = TREE_OPERAND (op, 0);
}
win = op;
......
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