Commit c877ae8d by Arnaud Charlet

[multiple changes]

2016-10-13  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to
	optional refinement for abstract states with only partial refinement
	visible.

2016-10-13  Justin Squirek  <squirek@adacore.com>

	* sem_ch13.adb: Minor correction in comment in
	Analyze_Aspect_Specifications
	* sem_prag.adb: Minor reformatting.

2016-10-13  Thomas Quinot  <quinot@adacore.com>

	* s-stratt-xdr.adb: Disable compiler unit warnings.

2016-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Visible_Component): In an instance body, check
	whether the component may be hidden in a selected component by
	a homonym that is a primitive operation of the type of the prefix.

From-SVN: r241106
parent c5955224
2016-10-13 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to
optional refinement for abstract states with only partial refinement
visible.
2016-10-13 Justin Squirek <squirek@adacore.com>
* sem_ch13.adb: Minor correction in comment in
Analyze_Aspect_Specifications
* sem_prag.adb: Minor reformatting.
2016-10-13 Thomas Quinot <quinot@adacore.com>
* s-stratt-xdr.adb: Disable compiler unit warnings.
2016-10-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Visible_Component): In an instance body, check
whether the component may be hidden in a selected component by
a homonym that is a primitive operation of the type of the prefix.
2016-10-13 Jakub Jelinek <jakub@redhat.com> 2016-10-13 Jakub Jelinek <jakub@redhat.com>
PR target/77957 PR target/77957
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1996-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1996-2016, Free Software Foundation, Inc. --
-- -- -- --
-- GARLIC is free software; you can redistribute it and/or modify it under -- -- GARLIC is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -33,6 +33,11 @@ ...@@ -33,6 +33,11 @@
-- standard. It is especially useful for exchanging streams between two -- standard. It is especially useful for exchanging streams between two
-- different systems with different basic type representations and endianness. -- different systems with different basic type representations and endianness.
pragma Warnings (Off, "*not allowed in compiler unit");
-- This body is used only when rebuilding the runtime library, not when
-- building the compiler, so it's OK to depend on features that would
-- otherwise break bootstrap (e.g. IF-expressions).
with Ada.IO_Exceptions; with Ada.IO_Exceptions;
with Ada.Streams; use Ada.Streams; with Ada.Streams; use Ada.Streams;
with Ada.Unchecked_Conversion; with Ada.Unchecked_Conversion;
......
...@@ -1852,7 +1852,7 @@ package body Sem_Ch13 is ...@@ -1852,7 +1852,7 @@ package body Sem_Ch13 is
Set_From_Aspect_Specification (Aitem); Set_From_Aspect_Specification (Aitem);
end Make_Aitem_Pragma; end Make_Aitem_Pragma;
-- Start of processing for Analyze_One_Aspect -- Start of processing for Analyze_Aspect_Specifications
begin begin
-- Skip aspect if already analyzed, to avoid looping in some cases -- Skip aspect if already analyzed, to avoid looping in some cases
......
...@@ -18133,11 +18133,38 @@ package body Sem_Ch3 is ...@@ -18133,11 +18133,38 @@ package body Sem_Ch3 is
then then
return True; return True;
-- In the body of an instantiation, no need to check for the visibility -- In the body of an instantiation, check the visibility of a component
-- of a component. -- in case it has a homograph that is a primitive operation of a private
-- type which was not visible in the generic unit.
-- Should Is_Prefixed_Call be propagated from template to instance???
elsif In_Instance_Body then elsif In_Instance_Body then
return True; if not Is_Tagged_Type (Original_Type)
or else not Is_Private_Type (Original_Type)
then
return True;
else
declare
Subp_Elmt : Elmt_Id;
begin
Subp_Elmt := First_Elmt (Primitive_Operations (Original_Type));
while Present (Subp_Elmt) loop
-- The component is hidden by a primitive operation
if Chars (Node (Subp_Elmt)) = Chars (C) then
return False;
end if;
Next_Elmt (Subp_Elmt);
end loop;
return True;
end;
end if;
-- If the component has been declared in an ancestor which is currently -- If the component has been declared in an ancestor which is currently
-- a private type, then it is not visible. The same applies if the -- a private type, then it is not visible. The same applies if the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment