This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ptrmem.C conflict with PSImode pointers
- To: jason at redhat dot com (Jason Merrill)
- Subject: Re: ptrmem.C conflict with PSImode pointers
- From: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Date: Thu, 22 Mar 2001 23:29:12 +0000 (GMT)
- Cc: amylaar at cambridge dot redhat dot com (Joern Rennecke),gcc-patches at gcc dot gnu dot org
> > So should I change this bit in stor-layout.c:layout_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;
> > break;
>
> Yes, I suppose so. Though hopefully only the mode should be different.
Like this?
Thu Mar 22 23:26:34 2001 J"orn Rennecke <amylaar@redhat.com>
* stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.
Index: stor-layout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stor-layout.c,v
retrieving revision 1.95
diff -p -r1.95 stor-layout.c
*** stor-layout.c 2001/03/03 03:53:43 1.95
--- stor-layout.c 2001/03/22 23:26:30
*************** layout_type (type)
*** 1341,1347 ****
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;
break;
case FUNCTION_TYPE:
--- 1341,1349 ----
case OFFSET_TYPE:
TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);
! /* 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: