* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Test the
underlying type.
* gcc-interface/trans.c (lvalue_required_p): Likewise.
From-SVN: r145663
+2009-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Test the
+ underlying type.
+ * gcc-interface/trans.c (lvalue_required_p): Likewise.
+
2009-04-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Max_Size_In_Storage_Elmts>:
/* Case 3: If this is a constant renaming and creating a
new object is allowed and cheap, treat it as a normal
object whose initial value is what is being renamed. */
- if (const_flag && Is_Elementary_Type (Etype (gnat_entity)))
+ if (const_flag
+ && !Is_Composite_Type
+ (Underlying_Type (Etype (gnat_entity))))
;
/* Case 4: Make this into a constant pointer to the object we
attached to the CONST_DECL. */
return (aliased != 0
/* This should match the constant case of the renaming code. */
- || Is_Composite_Type (Etype (Name (gnat_parent)))
+ || Is_Composite_Type
+ (Underlying_Type (Etype (Name (gnat_parent))))
|| Nkind (Name (gnat_parent)) == N_Identifier);
default: