aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1994-03-17 21:33:36 -0800
committerPer Bothner <bothner@gcc.gnu.org>1994-03-17 21:33:36 -0800
commita6458cef6332ab9f9fdcc5b372eab480ef1d23d2 (patch)
treeb62f8462d5bf42a0bfb61415543722b4831277b0 /gcc
parent7dcf01c29cbcc7056e41c27b912309dc60b44071 (diff)
downloadgcc-a6458cef6332ab9f9fdcc5b372eab480ef1d23d2.zip
gcc-a6458cef6332ab9f9fdcc5b372eab480ef1d23d2.tar.gz
gcc-a6458cef6332ab9f9fdcc5b372eab480ef1d23d2.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stor-layout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index b09f320..9c51c70 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -880,12 +880,15 @@ layout_type (type)
}
break;
- /* Pascal types */
+ /* Pascal and Chill types */
case BOOLEAN_TYPE: /* store one byte/boolean for now. */
TYPE_MODE (type) = QImode;
TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
TYPE_PRECISION (type) = 1;
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;
case CHAR_TYPE: