diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-05 16:19:41 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-05 16:19:41 +0000 |
commit | 4812cab08540284ce496b890bbc33516e5b3e009 (patch) | |
tree | 745f6df2d0d5618c0d8654537cd6b187b7e1b2a5 /gcc/stor-layout.c | |
parent | 1f3fcf325fe5c30b4beebb7be5e85226e9b2dd63 (diff) | |
download | gcc-4812cab08540284ce496b890bbc33516e5b3e009.tar.gz |
* stor-layout.c (layout_type, case FUNCTION_TYPE): Make size
FUNCTION_BOUNDARY, not POINTER_SIZE * 2.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 031f34856bd..979aabab8c1 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1582,9 +1582,12 @@ layout_type (tree type) case FUNCTION_TYPE: case METHOD_TYPE: - TYPE_MODE (type) = mode_for_size (2 * POINTER_SIZE, MODE_INT, 0); - TYPE_SIZE (type) = bitsize_int (2 * POINTER_SIZE); - TYPE_SIZE_UNIT (type) = size_int ((2 * POINTER_SIZE) / BITS_PER_UNIT); + /* It's hard to see what the mode and size of a function ought to + be, but we do know the alignment is FUNCTION_BOUNDARY, so + make it consistent with that. */ + TYPE_MODE (type) = mode_for_size (FUNCTION_BOUNDARY, MODE_INT, 0); + TYPE_SIZE (type) = bitsize_int (FUNCTION_BOUNDARY); + TYPE_SIZE_UNIT (type) = size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT); break; case POINTER_TYPE: |