aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 15:11:19 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 15:11:19 +0200
commit58a9d876fccd9c28dd4d5eb346cd2c695a3406fc (patch)
tree8f0bf6a3ca5791313cc3d1ce65c0e64c487a9581 /gcc/ada/exp_ch6.adb
parente34ca162e700cb23aa7a247b394bfbf17135498b (diff)
downloadgcc-58a9d876fccd9c28dd4d5eb346cd2c695a3406fc.zip
gcc-58a9d876fccd9c28dd4d5eb346cd2c695a3406fc.tar.gz
gcc-58a9d876fccd9c28dd4d5eb346cd2c695a3406fc.tar.bz2
[multiple changes]
2009-04-20 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Expand_Subtype_From_Expr): use the underlying_record_view when available, to create the proper constrained subtype for an object of a derived type with unknown discriminants. 2009-04-20 Javier Miranda <miranda@adacore.com> * exp_ch6.ad (Expand_Inlined_Call): Avoid generation of temporaries for formals that have pragma unreferenced. From-SVN: r146414
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 82311e1..989dc1a 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -3670,6 +3670,16 @@ package body Exp_Ch6 is
return;
end if;
+ -- Avoid generation of temporaries for unreferenced formals
+
+ -- What is going on here ??? test below is for *PRAGMA* unreferenced
+ -- not for an unreferenced formal. Is this a bug fix, or simply an
+ -- optimization. Needs comment fix and explanation ???
+
+ if Has_Pragma_Unreferenced (F) then
+ goto Continue;
+ end if;
+
-- If the argument may be a controlling argument in a call within
-- the inlined body, we must preserve its classwide nature to insure
-- that dynamic dispatching take place subsequently. If the formal
@@ -3790,6 +3800,7 @@ package body Exp_Ch6 is
Set_Renamed_Object (F, Temp);
end if;
+ <<Continue>>
Next_Formal (F);
Next_Actual (A);
end loop;