diff options
author | Justin Squirek <squirek@adacore.com> | 2020-05-29 15:44:50 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-15 09:42:34 -0400 |
commit | 3c30eac83cb16fb8085683515a796f22d5e33ef5 (patch) | |
tree | 86e557535f68bed5a7968f030ea0e1ba88af8230 /gcc | |
parent | a2f4fc6f3fe2ed458f348dccbab9367a35e6a3a2 (diff) | |
download | gcc-3c30eac83cb16fb8085683515a796f22d5e33ef5.zip gcc-3c30eac83cb16fb8085683515a796f22d5e33ef5.tar.gz gcc-3c30eac83cb16fb8085683515a796f22d5e33ef5.tar.bz2 |
[Ada] Spurious accessibility error on allocator
gcc/ada/
* exp_ch6.adb (Make_Build_In_Place_Call_Allocator): Normalize
the associated node for internally generated objects to be like
their SOAAT counter-parts.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index a42bd25..bb9b150 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -9732,6 +9732,12 @@ package body Exp_Ch6 is New_Occurrence_Of (Etype (BIP_Func_Call), Loc), Expression => New_Copy_Tree (BIP_Func_Call)))); + -- Manually set the associated node for the anonymous access type to + -- be its local declaration to avoid confusing and complicating + -- the accessibility machinary. + + Set_Associated_Node_For_Itype (Anon_Type, Tmp_Decl); + Expander_Mode_Save_And_Set (False); Insert_Action (Allocator, Tmp_Decl); Expander_Mode_Restore; |