aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@redhat.com>2001-03-23 16:59:56 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2001-03-23 16:59:56 +0000
commit25caaba84b328d4db7c8e23b73f0aa575876b53b (patch)
treee97c0777753ad5e3a9e7b0198c72832cac9f4ac4 /gcc/stor-layout.c
parent4ff17c6a1a1a22ba947b50e04d83110821170d13 (diff)
downloadgcc-25caaba84b328d4db7c8e23b73f0aa575876b53b.zip
gcc-25caaba84b328d4db7c8e23b73f0aa575876b53b.tar.gz
gcc-25caaba84b328d4db7c8e23b73f0aa575876b53b.tar.bz2
* stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.
From-SVN: r40781
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 152eff1..fb46cf5 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: