This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] Housekeeping work in gigi (17/n)


> 2009-09-29  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Factor out
> 	common code processing the component type into...
> 	<E_Array_Subtype>: Likewise.
> 	(gnat_to_gnu_component_type): ...this new static function.
> 	(maybe_pad_type): Minor cleanup.

This requires the following small adjustment.

Tested on i586-suse-linux, applied on the mainline.


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>

	* gnat.dg/atomic2.adb: New test.


-- 
Eric Botcazou
Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 152417)
+++ gcc-interface/decl.c	(working copy)
@@ -7868,6 +7868,11 @@ check_ok_for_atomic (tree object, Entity
      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);
-- { 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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]