Commit fc69eca0 by Per Bothner

stor-layout.c (layout_type): Use same code to layout CHAR_TYPE as for…

stor-layout.c (layout_type): Use same code to layout CHAR_TYPE as for INTEGER_TYPE (instead of hard-wiring...

* stor-layout.c (layout_type):  Use same code to layout CHAR_TYPE
as for INTEGER_TYPE (instead of hard-wiring in QImode).

From-SVN: r11177
parent cda0f51e
...@@ -687,6 +687,7 @@ layout_type (type) ...@@ -687,6 +687,7 @@ layout_type (type)
case INTEGER_TYPE: case INTEGER_TYPE:
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
case CHAR_TYPE:
if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
&& tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0) && tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0)
TREE_UNSIGNED (type) = 1; TREE_UNSIGNED (type) = 1;
...@@ -933,13 +934,6 @@ layout_type (type) ...@@ -933,13 +934,6 @@ layout_type (type)
TREE_UNSIGNED (type) = 1; TREE_UNSIGNED (type) = 1;
break; break;
case CHAR_TYPE:
TYPE_MODE (type) = QImode;
TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
TYPE_PRECISION (type) = GET_MODE_BITSIZE (TYPE_MODE (type));
TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type));
break;
case SET_TYPE: case SET_TYPE:
if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST
|| TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST) || TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST)
......
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