* 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
+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.
+
2014-01-24 Robert Dewar <dewar@adacore.com>
* sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
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));