+2010-07-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>:
+ Branch to common code handling the alignment of discrete types.
+ <E_Signed_Integer_Type>: Likewise.
+ <E_Modular_Integer_Type>: Likewise.
+
2010-07-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_handle_option): Do not populate gnat_argv.
/* Note that the bounds are updated at the end of this function
to avoid an infinite recursion since they refer to the type. */
}
- break;
+ goto discrete_type;
case E_Signed_Integer_Type:
case E_Ordinary_Fixed_Point_Type:
/* For integer types, just make a signed type the appropriate number
of bits. */
gnu_type = make_signed_type (esize);
- break;
+ goto discrete_type;
case E_Modular_Integer_Type:
{
gnu_type = gnu_subtype;
}
}
- break;
+ goto discrete_type;
case E_Signed_Integer_Subtype:
case E_Enumeration_Subtype:
gnat_to_gnu_type
(Original_Array_Type (gnat_entity)));
+ discrete_type:
+
/* We have to handle clauses that under-align the type specially. */
if ((Present (Alignment_Clause (gnat_entity))
|| (Is_Packed_Array_Type (gnat_entity)
relate_alias_sets (gnu_type, gnu_field_type, ALIAS_SET_COPY);
- /* Don't notify the field as "addressable", since we won't be taking
- it's address and it would prevent create_field_decl from making a
- bitfield. */
+ /* Don't declare the field as addressable since we won't be taking
+ its address and this would prevent create_field_decl from making
+ a bitfield. */
gnu_field
= create_field_decl (get_identifier ("OBJECT"), gnu_field_type,
gnu_type, NULL_TREE, bitsize_zero_node, 1, 0);
TYPE_ALIGN (gnu_type) = align;
relate_alias_sets (gnu_type, gnu_field_type, ALIAS_SET_COPY);
- /* Don't notify the field as "addressable", since we won't be taking
- it's address and it would prevent create_field_decl from making a
- bitfield. */
+ /* Don't declare the field as addressable since we won't be taking
+ its address and this would prevent create_field_decl from making
+ a bitfield. */
gnu_field
= create_field_decl (get_identifier ("F"), gnu_field_type,
gnu_type, NULL_TREE, bitsize_zero_node, 1, 0);
+2010-07-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/modular3.adb: New test.
+ * gnat.dg/modular3_pkg.ads: New helper.
+
2010-07-03 Iain Sandoe <iains@gcc.gnu.org>
Mikael Pettersson <mikpe@it.uu.se>
2010-07-02 Daniel Jacobowitz <dan@codesourcery.com>
Julian Brown <julian@codesourcery.com>
- Sandra Loosemore <sandra@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
* gcc.c-torture/execute/20100416-1.c: New test case.
2010-07-02 Julian Brown <julian@codesourcery.com>
- Sandra Loosemore <sandra@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
PR target/43703