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] Proper qualification of concurrent discriminants


This patch modifies resolution to perform minor expansion for SPARK in order to
properly qualify concurrent discriminants used as defaulted actuals in calls.

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

--  p.ads

package P is
   protected type PT (D : Integer) is
      procedure Dummy (Arg : Integer := D);
   end;

   PO : PT (0);
end P;

--  main.adb

with P;

procedure Main is
begin
   P.PO.Dummy;
end Main;

----------------------------
-- Compilation and output --
----------------------------

$ gcc -c -gnatdg -gnatd.F main.adb
with p;
with system;

procedure main is
begin
   p.po.dummy (arg => p.po.d);
end main;

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

2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
	for GNATprove.
	(Resolve_Entry): Clean up predicate

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]