diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 15:03:12 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 15:03:12 +0200 |
commit | 1d1c3ff418b2999791ad389de5ab90a770122987 (patch) | |
tree | 00b5a507870de829db5c0ab8f26e67e4598ae923 /gcc/ada/exp_ch4.adb | |
parent | 3c63845669fbdb489b1a56e30aeba51d6dbbe4af (diff) | |
download | gcc-1d1c3ff418b2999791ad389de5ab90a770122987.zip gcc-1d1c3ff418b2999791ad389de5ab90a770122987.tar.gz gcc-1d1c3ff418b2999791ad389de5ab90a770122987.tar.bz2 |
Complete previous change:
2009-04-29 Robert Dewar <dewar@adacore.com>
* prj-nmsc.ads: Minor reformatting
2009-04-29 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Conditional_Expression): Set the SLOC of the
expression on the existing parent If statement.
From-SVN: r146959
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index ba0079e..42f6199 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -3984,12 +3984,15 @@ package body Exp_Ch4 is Name => New_Occurrence_Of (Cnn, Sloc (Elsex)), Expression => Relocate_Node (Elsex)))); - -- Preserve the SLOC of a parent If statement, if any + -- Move the SLOC of the parent If statement to the newly created + -- one and change it to the SLOC of the expression which, after + -- expansion, will correspond to what is being evaluated. if Present (Parent (N)) and then Nkind (Parent (N)) = N_If_Statement then Set_Sloc (New_If, Sloc (Parent (N))); + Set_Sloc (Parent (N), Loc); end if; Set_Assignment_OK (Name (First (Then_Statements (New_If)))); |