2014-10-30 Yannick Moy <moy@adacore.com>
commitcab27d2a925534f93f837205b1b516ecae6185f3
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Oct 2014 11:34:41 +0000 (30 11:34 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Oct 2014 11:34:41 +0000 (30 11:34 +0000)
treeae3d2ce7780de669626aac1dfe56ce4ac6df7aaa
parentfb8120b2860496b59c428c55be1d93635e33b1c4
2014-10-30  Yannick Moy  <moy@adacore.com>

* inline.adb (Has_Single_Return_In_GNATprove_Mode):
Return False when return statement is inside one or more blocks.

2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
object declaration initialized by a function call that returns
an unconstrained result may be rewritted as a renaming of the
secondary stack result.

2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb: Add an entry for aspect Extensions_Visible in
table Canonical_Aspect.
* aspects.ads: Add entry for aspect Extensions_Visible in
tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
Implementation_Defined_Aspect.
* einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
the list of contract pragmas.
* par-prag.adb Pragma Extensions_Visible does not require special
processing from the parser.
* sem_ch3.adb (Analyze_Object_Declaration): Prevent an
implicit class-wide conversion of a formal parameter
of a specific tagged type whose related subprogram is
subject to pragma Extensions_Visible with value "False".
(Check_Abstract_Overriding): Add various overriding checks
related to pragma Extensions_Visible.
(Derive_Subprogram):
A subprogram subject to pragma Extensions_Visible with value
False requires overriding if the subprogram has at least one
controlling OUT parameter.
(Is_EVF_Procedure): New routine.
* sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
a specific tagged type whose related subprogram is subject to
pragma Extensions_Visible with value "False" cannot appear in
a class-wide conversion.
* sem_ch6.adb (Analyze_Subprogram_Contract): Remove
the assertion to account for pragma Extensions_Visible.
(Check_Overriding_Indicator): An overriding subprogram
inherits the contact of the overridden subprogram.
(New_Overloaded_Entity): An overriding subprogram inherits the
contact of the overridden subprogram.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Extensions_Visible.
(Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
require special processing at the freeze point.
* sem_prag.adb Add an entry for pragma Extensions_Visible in
table Sig_Flags.
(Analyze_Pragma): Ensure that various SPARK
pragmas lack identifiers in their arguments. Add processing for
pragma Extensions_Visible.
(Chain_CTC): Code reformatting.
* sem_res.adb (Resolve_Actuals): A formal parameter of a
specific tagged type whose related subprogram is subject to
pragma Extensions_Visible with value "False" cannot act as an
actual in a subprogram with value "True".
* sem_util.adb (Add_Classification): New routine.
(Add_Contract_Item): Account for pragma Extensions_Visible. Code
reformatting.
(Add_Contract_Test_Case): New routine.
(Add_Pre_Post_Condition): New routine.
(Extensions_Visible_Status): New routine.
(Inherit_Subprogram_Contract): New routine.
(Is_EVF_Expression): New routine.
(Is_Specific_Tagged_Type): New routine.
* sem_util.ads Add type Extensions_Visible_Mode and document all values.
(Add_Contract_Item): Add pragma Extensions_Visible to the
comment on usage.
(Inherit_Subprogram_Contract): New routine.
(Is_EVF_Expression): New routine.
(Is_Specific_Tagged_Type): New routine.
* sinfo.adb (Is_Inherited): New routine.
(Set_Is_Inherited): New routine.
* sinfo.ads Add flag Is_Inherited along with its usage in
nodes.
(Is_Inherited): New routine along with pragma Inline.
(Set_Is_Inherited): New routine along with pragma Inline.
* snames.ads-tmpl: Add predefined name "Extensions_Visible"
and a new Pragma_Id for the pragma.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216919 138bc75d-0d04-0410-961f-82ee72b054a4
18 files changed:
gcc/ada/ChangeLog
gcc/ada/aspects.adb
gcc/ada/aspects.ads
gcc/ada/einfo.adb
gcc/ada/exp_ch7.adb
gcc/ada/inline.adb
gcc/ada/par-prag.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads
gcc/ada/snames.ads-tmpl