decl.c (gnat_to_gnu_entity): Check for a dummy designated type via TYPE_MODE instead...
authorOlivier Hainque <hainque@act-europe.fr>
Tue, 21 Sep 2004 15:34:36 +0000 (17:34 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 21 Sep 2004 15:34:36 +0000 (17:34 +0200)
2004-09-21  Olivier Hainque  <hainque@act-europe.fr>

* decl.c (gnat_to_gnu_entity) <E_General_Access_Type>: Check for a
dummy designated type via TYPE_MODE instead of COMPLETE_TYPE_P. This
ensures proper handling of types with rep clauses, which might have
their TYPE_SIZE set already.

From-SVN: r87807

gcc/ada/ChangeLog
gcc/ada/decl.c

index 3799d7b0b54507e8d91756a8fdb4ddb34997820d..ca0256667f473bbea50419a6221a510ad4e5ab99 100644 (file)
@@ -1,3 +1,10 @@
+2004-09-21  Olivier Hainque  <hainque@act-europe.fr>
+
+       * decl.c (gnat_to_gnu_entity) <E_General_Access_Type>: Check for a
+       dummy designated type via TYPE_MODE instead of COMPLETE_TYPE_P. This
+       ensures proper handling of types with rep clauses, which might have
+       their TYPE_SIZE set already.
+
 2004-09-21  Robert Dewar  <dewar@gnat.com>
 
        * decl.c (gnat_to_gnu_type, case E_Modular_Integer_Type): Wrap modular
index b73081bb3eeed0246505bc72658e559c3dc72678..369f8d248d8b59ab88a71ea87f9436362657ccb4 100644 (file)
@@ -3032,7 +3032,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
                   of the call to gnat_to_gnu_type above if we are processing
                   an access type for a record component designating the
                   record type itself.  */
-               if (!COMPLETE_TYPE_P (gnu_desig_type))
+               if (TYPE_MODE (gnu_desig_type) == VOIDmode)
                  {
                    /* We must ensure that the pointer to variant we make will
                       be processed by update_pointer_to when the initial type