aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch11.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-01 15:23:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-01 15:23:32 +0200
commit84df40f7680c388bdb85cd859021013dd5c34197 (patch)
treebea83af31a5e3fb5b89d4ffbdd8ec590840e1e63 /gcc/ada/exp_ch11.adb
parentc7f0d2c0c5f24657874d7a4adeb504b3fe6c1f6f (diff)
downloadgcc-84df40f7680c388bdb85cd859021013dd5c34197.zip
gcc-84df40f7680c388bdb85cd859021013dd5c34197.tar.gz
gcc-84df40f7680c388bdb85cd859021013dd5c34197.tar.bz2
[multiple changes]
2011-08-01 Geert Bosch <bosch@adacore.com> * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra "," in choice list. 2011-08-01 Thomas Quinot <quinot@adacore.com> * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for explicit raise of a predefined exception as Comes_From_Source if the original N_Raise_Statement comes from source. 2011-08-01 Robert Dewar <dewar@adacore.com> * sinfo.ads: Add comment. * sem_ch6.adb: Minor reformatting. 2011-08-01 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Entity): Refine check for bad component size clause to avoid rejecting confirming clause when atomic/aliased present. 2011-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to better determine whether an entity reference is a write. * sem_util.adb (Is_LHS): refine predicate to handle assignment to a subcomponent. * lib-xref.adb (Output_References): Do no suppress a read reference at the same location as an immediately preceeding modify-reference, to handle properly in-out actuals. 2011-08-01 Tristan Gingold <gingold@adacore.com> * env.c (__gnat_setenv) [VMS]: Refine previous change. 2011-08-01 Quentin Ochem <ochem@adacore.com> * i-cstrin.adb (New_String): Changed implementation, now uses only the heap to compute the result. From-SVN: r177029
Diffstat (limited to 'gcc/ada/exp_ch11.adb')
-rw-r--r--gcc/ada/exp_ch11.adb27
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 80d1d8d..726af21 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1439,6 +1439,7 @@ package body Exp_Ch11 is
E : Entity_Id;
Str : String_Id;
H : Node_Id;
+ Src : Boolean;
begin
-- Processing for locally handled exception (exclude reraise case)
@@ -1510,12 +1511,12 @@ package body Exp_Ch11 is
return;
end if;
- -- Remaining processing is for the case where no string expression
- -- is present.
+ -- Remaining processing is for the case where no string expression is
+ -- present.
- -- Don't expand a raise statement that does not come from source
- -- if we have already had configurable run-time violations, since
- -- most likely it will be junk cascaded nonsense.
+ -- Don't expand a raise statement that does not come from source if we
+ -- have already had configurable run-time violations, since most likely
+ -- it will be junk cascaded nonsense.
if Configurable_Run_Time_Violations > 0
and then not Comes_From_Source (N)
@@ -1526,27 +1527,29 @@ package body Exp_Ch11 is
-- Convert explicit raise of Program_Error, Constraint_Error, and
-- Storage_Error into the corresponding raise (in High_Integrity_Mode
-- all other raises will get normal expansion and be disallowed,
- -- but this is also faster in all modes).
+ -- but this is also faster in all modes). Propagate Comes_From_Source
+ -- flag to the new node.
if Present (Name (N)) and then Nkind (Name (N)) = N_Identifier then
+ Src := Comes_From_Source (N);
if Entity (Name (N)) = Standard_Constraint_Error then
Rewrite (N,
- Make_Raise_Constraint_Error (Loc,
- Reason => CE_Explicit_Raise));
+ Make_Raise_Constraint_Error (Loc, Reason => CE_Explicit_Raise));
+ Set_Comes_From_Source (N, Src);
Analyze (N);
return;
elsif Entity (Name (N)) = Standard_Program_Error then
Rewrite (N,
- Make_Raise_Program_Error (Loc,
- Reason => PE_Explicit_Raise));
+ Make_Raise_Program_Error (Loc, Reason => PE_Explicit_Raise));
+ Set_Comes_From_Source (N, Src);
Analyze (N);
return;
elsif Entity (Name (N)) = Standard_Storage_Error then
Rewrite (N,
- Make_Raise_Storage_Error (Loc,
- Reason => SE_Explicit_Raise));
+ Make_Raise_Storage_Error (Loc, Reason => SE_Explicit_Raise));
+ Set_Comes_From_Source (N, Src);
Analyze (N);
return;
end if;