2009-10-02 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (check_ok_for_atomic): Do nothing if the type
+ doesn't come from source.
+
+2009-10-02 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_component_type): Force at least
unit size for the component size of an array with aliased components.
(maybe_pad_type): Do not warn for MAX_EXPR.
OBJECT is either a type or a decl. */
if (TYPE_P (object))
{
+ /* If this is an anonymous base type, nothing to check. Error will be
+ reported on the source type. */
+ if (!Comes_From_Source (gnat_entity))
+ return;
+
mode = TYPE_MODE (object);
align = TYPE_ALIGN (object);
size = TYPE_SIZE (object);
2009-10-02 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/atomic2.adb: New test.
+
+2009-10-02 Eric Botcazou <ebotcazou@adacore.com>
+
* gnat.dg/array11.adb: New test.
* gnat.dg/array12.adb: Likewise.
--- /dev/null
+-- { dg-do compile }
+
+procedure Atomic2 is
+
+ type Big is array (1..4) of Integer;
+ type Arr is array (1..10) of Big;
+ pragma Atomic_Components (Arr); -- { dg-warning "cannot be guaranteed" }
+
+begin
+ null;
+end;