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] Avoid frontend assertion failure


This patch avoids the failure of an assertion in the frontend
while traversing the homonym chain, looking at a potentially
overridden subprogram that belongs to an interface type.

After this patch the following test compiles without errors.

package Pak is
   type I is limited interface;
   generic
   package Gen is
      type T is private;
   private
      procedure Pouet (X : T);
      type T is tagged null record;
   end Gen;
end Pak;

package body Pak is
   package body Gen is
      procedure Pouet (X : T) is begin null; end;
   end Gen;
end Pak;

with Pak;
package Tsk is
   package Inst is new Pak.Gen;
   type New_T is new Inst.T;

   task type TT is new Pak.I with
      entry Pouet;
   end TT;
end Tsk;

Command: gcc -c -gnat05 tsk.ads

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-07-13  Javier Miranda  <miranda@adacore.com>

	* sem_ch6.adb (Check_Synchronized_Overriding): Add missing check before
	reading the Is_Interface attribute of the dispatching type.

Attachment: difs
Description: Text document


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