Commit a6458cef by Per Bothner

stor-layout.c (layout_type, [...]): Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative.

 * stor-layout.c (layout_type, case BOOLEAN_TYPE):
 Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative.

From-SVN: r6808
parent 7dcf01c2
...@@ -880,12 +880,15 @@ layout_type (type) ...@@ -880,12 +880,15 @@ layout_type (type)
} }
break; break;
/* Pascal types */ /* Pascal and Chill types */
case BOOLEAN_TYPE: /* store one byte/boolean for now. */ case BOOLEAN_TYPE: /* store one byte/boolean for now. */
TYPE_MODE (type) = QImode; TYPE_MODE (type) = QImode;
TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type))); TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
TYPE_PRECISION (type) = 1; TYPE_PRECISION (type) = 1;
TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type)); TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type));
if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
&& tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0)
TREE_UNSIGNED (type) = 1;
break; break;
case CHAR_TYPE: case CHAR_TYPE:
......
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