aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2008-08-01 11:29:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-01 11:29:30 +0200
commit8ca3bf9177d3503246cb4a693be7553f5bd56bca (patch)
treed9b94313b22496ec4636c63609cbf8f8e31c5079 /gcc/ada/exp_ch6.adb
parentf252a7d6bd8c273967dbe12e03cbe73d8d8299b0 (diff)
downloadgcc-8ca3bf9177d3503246cb4a693be7553f5bd56bca.zip
gcc-8ca3bf9177d3503246cb4a693be7553f5bd56bca.tar.gz
gcc-8ca3bf9177d3503246cb4a693be7553f5bd56bca.tar.bz2
exp_ch6.adb (Expand_Call): Adjustment to previous fix for passing correct accessibility levels.
2008-08-01 Gary Dismukes <dismukes@adacore.com> * exp_ch6.adb (Expand_Call): Adjustment to previous fix for passing correct accessibility levels. In the "when others" case, retrieve the access level of the Etype of Prev rather than Prev_Orig, because the original exression has not always been analyzed. From-SVN: r138493
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index d2281d1..2d31162 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -2284,13 +2284,15 @@ package body Exp_Ch6 is
Intval => Scope_Depth (Current_Scope) + 1),
Extra_Accessibility (Formal));
- -- For other cases we simply pass the level of the
- -- actual's access type.
+ -- For other cases we simply pass the level of the actual's
+ -- access type. The type is retrieved from Prev rather than
+ -- Prev_Orig, because in some cases Prev_Orig denotes a
+ -- original expression that has not been analyzed.
when others =>
Add_Extra_Actual
(Make_Integer_Literal (Loc,
- Intval => Type_Access_Level (Etype (Prev_Orig))),
+ Intval => Type_Access_Level (Etype (Prev))),
Extra_Accessibility (Formal));
end case;