diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-02-06 11:19:04 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-02-06 11:19:04 +0100 |
commit | ba08ba8412fb405d32184021400e1eda7b38b9a5 (patch) | |
tree | 01734c0c31a488eec661db595718216b48859072 /gcc/ada/exp_ch5.adb | |
parent | d2a6bd6bb570c3ece919323e9a01fe3c2beec08d (diff) | |
download | gcc-ba08ba8412fb405d32184021400e1eda7b38b9a5.zip gcc-ba08ba8412fb405d32184021400e1eda7b38b9a5.tar.gz gcc-ba08ba8412fb405d32184021400e1eda7b38b9a5.tar.bz2 |
[multiple changes]
2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb (Expand_Loop_Entry_Attributes): When
dealing with a for loop that iterates over a subtype indication
with a range, use the low and high bounds of the subtype.
2013-02-06 Nicolas Roche <roche@adacore.com>
* s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
be quoted
2013-02-06 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Process_Project_And_Apply_Config): New variable
Conf_Project. New recursive procedure Check_Project to find a non
aggregate project and put its Project_Id in Conf_Project. Fails if
no such project can be found.
(Get_Or_Create_Configuration_File): New parameter Conf_Project.
(Do_Autoconf): Use project directory of project Conf_Project to store
the generated configuration project file.
* prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
Conf_Project.
2013-02-06 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Actuals): Generate a read
reference for out-mode parameters in the cases specified by
RM 6.4.1(12).
2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
Loop_Entry, instead wait until the attribute has been expanded. The
delay ensures that any generated checks or temporaries are inserted
before the relocated prefix.
2013-02-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Code clean up.
From-SVN: r195792
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 2bdb827..66a7959 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -1754,13 +1754,18 @@ package body Exp_Ch5 is declare Loop_Spec : constant Node_Id := Loop_Parameter_Specification (Scheme); - Subt_Def : constant Node_Id := - Discrete_Subtype_Definition (Loop_Spec); Cond : Node_Id; + Subt_Def : Node_Id; begin - -- At this point in the expansion all discrete subtype definitions - -- should be transformed into ranges. + Subt_Def := Discrete_Subtype_Definition (Loop_Spec); + + -- When the loop iterates over a subtype indication with a range, + -- use the low and high bounds of the subtype itself. + + if Nkind (Subt_Def) = N_Subtype_Indication then + Subt_Def := Scalar_Range (Etype (Subt_Def)); + end if; pragma Assert (Nkind (Subt_Def) = N_Range); |