summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-decl.c1
-rw-r--r--gcc/tree.c1
3 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a6a1c4c3836..a7b3d6f2645 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
Mon Aug 17 11:46:19 1998 Jeffrey A Law (law@cygnus.com)
+ * From Graham
+ * tree.c (build_index_type): Copy TYPE_SIZE_UNIT from sizetype
+ to itype.
+ * c-decl.c (finish_enum): Copy TYPE_SIZ_UNIT from enumtype to tem.
+
* rs6000.c (secondary_reload_class): For TARGET_ELF, indicate that
a BASE_REGS register is needed as an intermediate when copying
a symbolic value into any register class other than BASE_REGS.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5d20c9770dd..1b040b1db24 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6219,6 +6219,7 @@ finish_enum (enumtype, values, attributes)
TYPE_MIN_VALUE (tem) = TYPE_MIN_VALUE (enumtype);
TYPE_MAX_VALUE (tem) = TYPE_MAX_VALUE (enumtype);
TYPE_SIZE (tem) = TYPE_SIZE (enumtype);
+ TYPE_SIZE_UNIT (tem) = TYPE_SIZE_UNIT (enumtype);
TYPE_MODE (tem) = TYPE_MODE (enumtype);
TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype);
TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype);
diff --git a/gcc/tree.c b/gcc/tree.c
index 59c02b4b629..044be55e8cd 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4130,6 +4130,7 @@ build_index_type (maxval)
TYPE_MODE (itype) = TYPE_MODE (sizetype);
TYPE_SIZE (itype) = TYPE_SIZE (sizetype);
+ TYPE_SIZE_UNIT (itype) = TYPE_SIZE_UNIT (sizetype);
TYPE_ALIGN (itype) = TYPE_ALIGN (sizetype);
if (TREE_CODE (maxval) == INTEGER_CST)
{