From a6363ed30ea916a6cc1058cffce907c25aadcf8d Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 18 Apr 2016 14:29:53 +0200 Subject: [multiple changes] 2016-04-18 Ed Schonberg * 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 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add RE_Default_Priority. 2016-04-18 Bob Duff * 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 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes. 2016-04-18 Ed Schonberg * 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 --- gcc/ada/sem_ch4.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/ada/sem_ch4.adb') 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)); -- cgit v1.1