summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_disp.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 15:15:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 15:15:04 +0000
commitf365561ffab768c3ee45acadcbe588957454b54a (patch)
tree857f1d9f2d3c0c7ac4cc950c286d918c5ee36264 /gcc/ada/exp_disp.adb
parentdd6d4ced788db32e5412da4bbdefbf8c7bc5ddda (diff)
downloadgcc-f365561ffab768c3ee45acadcbe588957454b54a.tar.gz
2014-01-24 Gary Dismukes <dismukes@adacore.com>
* exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification stripped off. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207043 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_disp.adb')
-rw-r--r--gcc/ada/exp_disp.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index b4c56accb0f..1f84738985f 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -777,11 +777,12 @@ package body Exp_Disp is
Param := First_Actual (Call_Node);
while Present (Param) loop
- -- Cases in which we may have generated runtime checks
- if Param = Ctrl_Arg
- or else Subp = Eq_Prim_Op
- then
+ -- Cases in which we may have generated run-time checks. Note that
+ -- we strip any qualification from Param before comparing with the
+ -- already-stripped controlling argument.
+
+ if Unqualify (Param) = Ctrl_Arg or else Subp = Eq_Prim_Op then
Append_To (New_Params,
Duplicate_Subexpr_Move_Checks (Param));