aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-18 14:29:53 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-18 14:29:53 +0200
commita6363ed30ea916a6cc1058cffce907c25aadcf8d (patch)
tree253f1b50bcf0bf51e78aa33de2b3f24e047d7b91 /gcc/ada/sem_ch4.adb
parent4afcf3a5a0391b309520cbcf5d4836d611bd7fd9 (diff)
downloadgcc-a6363ed30ea916a6cc1058cffce907c25aadcf8d.zip
gcc-a6363ed30ea916a6cc1058cffce907c25aadcf8d.tar.gz
gcc-a6363ed30ea916a6cc1058cffce907c25aadcf8d.tar.bz2
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference): Refine check on illegal calls to entities within a task body, when the entity is declared in an object of the same type. In a generic context there might be no explicit dereference but if the prefix includes an access type the construct is legal. 2016-04-18 Arnaud Charlet <charlet@adacore.com> * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add RE_Default_Priority. 2016-04-18 Bob Duff <duff@adacore.com> * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check if the pragma came from an aspect specification. 2016-04-18 Gary Dismukes <dismukes@adacore.com> * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes. 2016-04-18 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress superfluous conformance check on an inlined body with a previous spec, use the fact that the generated declaration does not come from source. We must treat the entity as coming from source to enable some back-end inlining when pragma appears after the body. From-SVN: r235136
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index d7264ec..80e9431 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -4221,6 +4221,13 @@ package body Sem_Ch4 is
if Nkind (Nod) = N_Explicit_Dereference then
return True;
+ -- When expansion is disabled an explicit dereference may not have
+ -- been inserted, but if this is an access type the indirection makes
+ -- the call safe.
+
+ elsif Is_Access_Type (Etype (Nod)) then
+ return True;
+
elsif Nkind_In (Nod, N_Indexed_Component, N_Selected_Component) then
return Has_Dereference (Prefix (Nod));