diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-03-05 16:19:41 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-03-05 11:19:41 -0500 |
commit | 019dd4ece990a8efd7eb2a85653440972c83035d (patch) | |
tree | 745f6df2d0d5618c0d8654537cd6b187b7e1b2a5 /gcc | |
parent | 33e70558b08bc6f34907bd3e4a3bda552c9bb3b6 (diff) | |
download | gcc-019dd4ece990a8efd7eb2a85653440972c83035d.zip gcc-019dd4ece990a8efd7eb2a85653440972c83035d.tar.gz gcc-019dd4ece990a8efd7eb2a85653440972c83035d.tar.bz2 |
stor-layout.c (layout_type, [...]): Make size FUNCTION_BOUNDARY, not POINTER_SIZE * 2.
* stor-layout.c (layout_type, case FUNCTION_TYPE): Make size
FUNCTION_BOUNDARY, not POINTER_SIZE * 2.
From-SVN: r78972
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/stor-layout.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5600ef5..6698fb8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * stor-layout.c (layout_type, case FUNCTION_TYPE): Make size + FUNCTION_BOUNDARY, not POINTER_SIZE * 2. + 2004-03-05 Ian Lance Taylor <ian@wasabisystems.com> * configure.ac: When passing --enable-languages to subdir diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 031f348..979aaba 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: |