diff options
author | Robert Dewar <dewar@gnat.com> | 2004-09-21 15:31:03 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-09-21 17:31:03 +0200 |
commit | 910d20fcb8c5fa83c64c1540cca945cc0c31d77c (patch) | |
tree | 0f2f5fda62754d844de054ab5257854ecaf80e0f /gcc/ada/utils2.c | |
parent | f1b1846249458e8b583b407f674fec541c4f6869 (diff) | |
download | gcc-910d20fcb8c5fa83c64c1540cca945cc0c31d77c.zip gcc-910d20fcb8c5fa83c64c1540cca945cc0c31d77c.tar.gz gcc-910d20fcb8c5fa83c64c1540cca945cc0c31d77c.tar.bz2 |
decl.c (gnat_to_gnu_type, [...]): Wrap modular packed array types in both little- and big-endian cases.
2004-09-21 Robert Dewar <dewar@gnat.com>
* decl.c (gnat_to_gnu_type, case E_Modular_Integer_Type): Wrap modular
packed array types in both little- and big-endian cases. This change
ensures that we no longer count on the unused bits being initialized
for such types (and in particular ensures that equality testing will
only read the relevant bits).
Change name TYPE_LEFT_JUSTIFIED_MODULAR_P to TYPE_JUSTIFIED_MODULAR_P
These changes mean that we no longer need to initialize small packed
arrays.
(gnat_to_gnu_entity) <E_Record_Subtype>: Apply the same
optimization to an LJM field as to its parent field.
* ada-tree.h:, trans.c, utils.c, utils2.c:
Change name TYPE_LEFT_JUSTIFIED_MODULAR_P to TYPE_JUSTIFIED_MODULAR_P
From-SVN: r87806
Diffstat (limited to 'gcc/ada/utils2.c')
-rw-r--r-- | gcc/ada/utils2.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index 4611fc8..9015dca 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -112,7 +112,7 @@ tree get_base_type (tree type) { if (TREE_CODE (type) == RECORD_TYPE - && TYPE_LEFT_JUSTIFIED_MODULAR_P (type)) + && TYPE_JUSTIFIED_MODULAR_P (type)) type = TREE_TYPE (TYPE_FIELDS (type)); while (TREE_TYPE (type) @@ -601,7 +601,7 @@ build_binary_op (enum tree_code op_code, tree result_type, if (operation_type && TREE_CODE (operation_type) == RECORD_TYPE - && TYPE_LEFT_JUSTIFIED_MODULAR_P (operation_type)) + && TYPE_JUSTIFIED_MODULAR_P (operation_type)) operation_type = TREE_TYPE (TYPE_FIELDS (operation_type)); if (operation_type @@ -631,9 +631,9 @@ build_binary_op (enum tree_code op_code, tree result_type, || POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (left_operand, 0))))) || (((TREE_CODE (left_type) == RECORD_TYPE - /* Don't remove conversions to left-justified modular + /* Don't remove conversions to justified modular types. */ - && !TYPE_LEFT_JUSTIFIED_MODULAR_P (left_type)) + && !TYPE_JUSTIFIED_MODULAR_P (left_type)) || TREE_CODE (left_type) == ARRAY_TYPE) && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (left_operand, 0))) @@ -661,13 +661,13 @@ build_binary_op (enum tree_code op_code, tree result_type, type, which we must not remove. */ while (TREE_CODE (right_operand) == VIEW_CONVERT_EXPR && ((TREE_CODE (right_type) == RECORD_TYPE - && !TYPE_LEFT_JUSTIFIED_MODULAR_P (right_type) + && !TYPE_JUSTIFIED_MODULAR_P (right_type) && !TYPE_ALIGN_OK (right_type) && !TYPE_IS_FAT_POINTER_P (right_type)) || TREE_CODE (right_type) == ARRAY_TYPE) && (((TREE_CODE (TREE_TYPE (TREE_OPERAND (right_operand, 0))) == RECORD_TYPE) - && !(TYPE_LEFT_JUSTIFIED_MODULAR_P + && !(TYPE_JUSTIFIED_MODULAR_P (TREE_TYPE (TREE_OPERAND (right_operand, 0)))) && !(TYPE_ALIGN_OK (TREE_TYPE (TREE_OPERAND (right_operand, 0)))) @@ -803,10 +803,10 @@ build_binary_op (enum tree_code op_code, tree result_type, TREE_OPERAND (right_operand, 0)), integer_zero_node); - /* If either object is a left-justified modular types, get the + /* If either object is a justified modular types, get the fields from within. */ if (TREE_CODE (left_type) == RECORD_TYPE - && TYPE_LEFT_JUSTIFIED_MODULAR_P (left_type)) + && TYPE_JUSTIFIED_MODULAR_P (left_type)) { left_operand = convert (TREE_TYPE (TYPE_FIELDS (left_type)), left_operand); @@ -815,7 +815,7 @@ build_binary_op (enum tree_code op_code, tree result_type, } if (TREE_CODE (right_type) == RECORD_TYPE - && TYPE_LEFT_JUSTIFIED_MODULAR_P (right_type)) + && TYPE_JUSTIFIED_MODULAR_P (right_type)) { right_operand = convert (TREE_TYPE (TYPE_FIELDS (right_type)), right_operand); @@ -1039,7 +1039,7 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) if (operation_type && TREE_CODE (operation_type) == RECORD_TYPE - && TYPE_LEFT_JUSTIFIED_MODULAR_P (operation_type)) + && TYPE_JUSTIFIED_MODULAR_P (operation_type)) operation_type = TREE_TYPE (TYPE_FIELDS (operation_type)); if (operation_type |