From: J"orn Rennecke Date: Fri, 23 Mar 2001 16:59:56 +0000 (+0000) Subject: * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25caaba84b328d4db7c8e23b73f0aa575876b53b;p=gcc.git * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type. From-SVN: r40781 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e733bfd5e8c..72c25a4646b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 23 16:59:08 2001 J"orn Rennecke + + * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type. + 2001-03-23 Bryce McKinlay * extend.texi: Document the "java_interface" attribute. 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: