Commit 5004b234 by Eric Botcazou Committed by Eric Botcazou

decl.c (check_ok_for_atomic): Do nothing if the type doesn't come from source.

	* gcc-interface/decl.c (check_ok_for_atomic): Do nothing if the type
	doesn't come from source.

From-SVN: r152418
parent 1aa8b1dd
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.
......
......@@ -7868,6 +7868,11 @@ check_ok_for_atomic (tree object, Entity_Id gnat_entity, bool comp_p)
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.
......
-- { 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment