OSDN Git Service

* stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Mar 2001 16:59:56 +0000 (16:59 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Mar 2001 16:59:56 +0000 (16:59 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40781 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/stor-layout.c

index e733bfd..72c25a4 100644 (file)
@@ -1,3 +1,7 @@
+Fri Mar 23 16:59:08 2001  J"orn Rennecke <amylaar@redhat.com>
+
+       * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.
+
 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
 
        * extend.texi: Document the "java_interface" attribute.
index 152eff1..fb46cf5 100644 (file)
@@ -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: