diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/exp_disp.adb | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 576d30643bb..084fb96c16b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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. 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)); |