exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when comparing it with Ctrl_Arg...

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.

From-SVN: r207043
This commit is contained in:
Gary Dismukes 2014-01-24 15:15:04 +00:00 committed by Arnaud Charlet
parent ab986406d5
commit e6d5d9405e
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -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));