From: Doug Evans Date: Mon, 5 Jul 1993 06:25:00 +0000 (+0000) Subject: (get_narrower): Preserve unsignedness when bitschange == 0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e02b99578f39276f5c18f6a310bcb2949508966f;p=gcc.git (get_narrower): Preserve unsignedness when bitschange == 0. From-SVN: r4842 --- diff --git a/gcc/tree.c b/gcc/tree.c index 82bf4ccc07a..5f57d4347bb 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -3162,7 +3162,14 @@ get_narrower (op, unsignedp_ptr) break; first = 0; } - /* A change in nominal type can always be stripped. */ + else /* bitschange == 0 */ + { + /* A change in nominal type can always be stripped, but we must + preserve the unsignedness. */ + if (first) + uns = TREE_UNSIGNED (TREE_TYPE (op)); + first = 0; + } win = op; }