summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-23 16:59:56 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2001-03-23 16:59:56 +0000
commit60bf59a4f0dda632b857764c13b434db0d6853be (patch)
treee97c0777753ad5e3a9e7b0198c72832cac9f4ac4 /gcc/stor-layout.c
parent7d55917cdef90c7a92935f3b8471e8a3dea31fee (diff)
downloadgcc-60bf59a4f0dda632b857764c13b434db0d6853be.tar.gz
* stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 152eff10f36..fb46cf581fc 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1341,7 +1341,9 @@ layout_type (type)
case OFFSET_TYPE:
TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);
- TYPE_MODE (type) = ptr_mode;
+ /* A pointer might be MODE_PARTIAL_INT,
+ but ptrdiff_t must be integral. */
+ TYPE_MODE (type) = mode_for_size (POINTER_SIZE, MODE_INT, 0);
break;
case FUNCTION_TYPE: