diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-15 14:18:14 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-15 14:18:14 +0200 |
commit | bafc9e1d9844e54d24656a2da4de4aabcb1d2f47 (patch) | |
tree | 611708cb44aa4c1ecc5d5494b6c656f0040e4c7b | |
parent | 443614e35f5f491ae123ca92778947c47d3418f3 (diff) | |
download | gcc-bafc9e1d9844e54d24656a2da4de4aabcb1d2f47.zip gcc-bafc9e1d9844e54d24656a2da4de4aabcb1d2f47.tar.gz gcc-bafc9e1d9844e54d24656a2da4de4aabcb1d2f47.tar.bz2 |
[multiple changes]
2009-04-15 Robert Dewar <dewar@adacore.com>
* sem_eval.adb (Get_Static_Length): Go to origin node for array bounds
in case they were rewritten by expander (Force_Evaluation).
* targparm.adb (Get_Target_Parameters): Correct check for
Suppress_Exception_Locations.
2009-04-15 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be
inlined is of an array type that is not bit-packed, use a renaming
declaration to capture its value, rather than a constant declaration.
From-SVN: r146104
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/exp_ch6.adb | 9 | ||||
-rw-r--r-- | gcc/ada/sem_eval.adb | 6 | ||||
-rw-r--r-- | gcc/ada/targparm.adb | 6 |
4 files changed, 30 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5d97326..23d1a3e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,19 @@ 2009-04-15 Robert Dewar <dewar@adacore.com> + * sem_eval.adb (Get_Static_Length): Go to origin node for array bounds + in case they were rewritten by expander (Force_Evaluation). + + * targparm.adb (Get_Target_Parameters): Correct check for + Suppress_Exception_Locations. + +2009-04-15 Ed Schonberg <schonberg@adacore.com> + + * exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be + inlined is of an array type that is not bit-packed, use a renaming + declaration to capture its value, rather than a constant declaration. + +2009-04-15 Robert Dewar <dewar@adacore.com> + * rtsfind.adb: Minor reformatting. 2009-04-15 Emmanuel Briot <briot@adacore.com> diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 4bab3d2..edb08c3 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -3795,9 +3795,18 @@ package body Exp_Ch6 is -- its value is captured in a renaming declaration. Otherwise -- declare a local constant initialized with the actual. + -- We also use a renaming declaration for expressions of an + -- array type that is not bit-packed, both for efficiency reasons + -- and to respect the semantics of the call: in most cases the + -- original call will pass the parameter by reference, and thus + -- the inlined code will have the same semantics. + if Ekind (F) = E_In_Parameter and then not Is_Limited_Type (Etype (A)) and then not Is_Tagged_Type (Etype (A)) + and then + (not Is_Array_Type (Etype (A)) + or else Is_Bit_Packed_Array (Etype (A))) then Decl := Make_Object_Declaration (Loc, diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 2edcd0e..596b4af 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -2504,8 +2504,10 @@ package body Sem_Eval is -- Start of processing for Extract_Length begin - Decompose_Expr (Type_Low_Bound (T), Ent1, Kind1, Cons1); - Decompose_Expr (Type_High_Bound (T), Ent2, Kind2, Cons2); + Decompose_Expr + (Original_Node (Type_Low_Bound (T)), Ent1, Kind1, Cons1); + Decompose_Expr + (Original_Node (Type_High_Bound (T)), Ent2, Kind2, Cons2); if Present (Ent1) and then Kind1 = Kind2 diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb index 52bbbcb..da42ba8 100644 --- a/gcc/ada/targparm.adb +++ b/gcc/ada/targparm.adb @@ -408,10 +408,10 @@ package body Targparm is -- Suppress_Exception_Locations - elsif System_Text (P .. P + 34) = - "pragma Suppress_Exception_Locations;" + elsif System_Text (P .. P + 35) = + "pragma Suppress_Exception_Locations;" then - P := P + 35; + P := P + 36; Opt.Exception_Locations_Suppressed := True; goto Line_Loop_Continue; |