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] Internal crash on illegal aspect Part_Of


This patch modifies the analysis of aspect specifications to continue the
analysis after encountering an illegal aspect Part_Of.

------------
-- Source --
------------

--  po_t.ads

package PO_T is
   protected Prot_Typ is
      function Get return Integer;
      entry Set (X : Integer);

   private
      Condition : Boolean := True
        with Part_Of => Prot_Typ;
   end Prot_Typ;
end PO_T;

--  po_t.adb

package body PO_T is
   protected body Prot_Typ is
      function Get return Integer is
      begin return 0; end Get;

      entry Set (X : Integer) when Condition is
      begin null; end Set;
   end Prot_Typ;
end PO_T;

----------------------------
-- Compilation and Output --
----------------------------

$ gcc -c po_t.adb
po_t.ads:8:14: aspect "Part_Of" must apply to package instantiation, object,
  single protected type or single task type

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

2015-11-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
	after encountering an illegal aspect Part_Of.

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]