diff options
author | Olivier Hainque <hainque@adacore.com> | 2007-11-07 09:51:46 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2007-11-07 09:51:46 +0000 |
commit | cb88a3eae3a107f701b0426ccdaad15aace794e2 (patch) | |
tree | 2d77e4943895345d425dd82dd3ecbe35e331c32a /gcc/ada/decl.c | |
parent | 4daf64719c18eb0a0cd22d0a3a6a27d8e4787b17 (diff) | |
download | gcc-cb88a3eae3a107f701b0426ccdaad15aace794e2.zip gcc-cb88a3eae3a107f701b0426ccdaad15aace794e2.tar.gz gcc-cb88a3eae3a107f701b0426ccdaad15aace794e2.tar.bz2 |
decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we craft and expand comment.
2007-11-07 Olivier Hainque <hainque@adacore.com>
* decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
craft and expand comment.
testsuite/
* gnat.dg/max_align.adb: New test.
From-SVN: r129958
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 4a55947..fdb39f2 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -5144,10 +5144,13 @@ make_aligning_type (tree type, unsigned int align, tree size, size_binop (PLUS_EXPR, room_st, voffset_st)), bitsize_unit_node); - /* Craft the GCC record representation. The sizes are set manually to - account for the maximum possible value of voffset, which avoids complex - self-references in the size expression and corresponds to what should be - "alloc"ated for this type anyway. + /* Craft the GCC record representation. We exceptionally do everything + manually here because 1) our generic circuitry is not quite ready to + handle the complex position/size expressions we are setting up, 2) we + have a strong simplifying factor at hand: we know the maximum possible + value of voffset, and 3) we have to set/reset at least the sizes in + accordance with this maximum value anyway, as we need them to convey + what should be "alloc"ated for this type. Use -1 as the 'addressable' indication for the field to prevent the creation of a bitfield. We don't need one, it would have damaging @@ -5171,6 +5174,8 @@ make_aligning_type (tree type, unsigned int align, tree size, = size_binop (PLUS_EXPR, size, size_int (room + align / BITS_PER_UNIT)); + TYPE_MODE (record_type) = BLKmode; + copy_alias_set (record_type, type); return record_type; } |