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]

[Ada] fix bug box in handling of tagged types


Tested under i686-linux, committed on mainline.

Fix bug box when compiling following code, caused by wrong usage of the
First_Private_Entity attribute.

gcc -c discr2.adb
--
package Discr2 is
   package Windowing is
      type Abstract_Window (Identity : Integer) is tagged null record;
      type Window (Identity : Integer) is new Abstract_Window with private;
   private
      type Window (Identity : Integer) is
        new Abstract_Window (Identity) with null record;
   end Windowing;
   Win : Windowing.Window (100);
end Discr2;

2005-03-17  Javier Miranda  <miranda@adacore.com>

	* einfo.adb (First_Private_Entity, Set_First_Private_Entity): Addition
	of one barrier to avoid wrong usage of this attribute.

	* sem_ch12.adb (Formal_Entity): Fix erroneous usage of the attribute
	First_Private_Entity.

	* sem_ch7.adb (Install_Visible_Declarations): Add a barrier to protect
	the subprogram against wrong usage.
	Adapt the code to traverse the entities in the
	scope of a record_type because in addition to its usage regarding
	packages, this subprogram is also called by Expand_N_Freeze_Entity
	to install the visible declarations of the enclosing scope of a
	record_type_with_private to establish the proper visibility before
	freezing the entity and related subprograms.

Attachment: difs.5
Description: Text document


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