aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2010-06-14 15:01:29 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-14 17:01:29 +0200
commit9fc91982f25c892710a0a8a00ab9d69a30481285 (patch)
tree37afbd817b1164f256d00972cc319a88b4ea3bbb
parent66de78a39f9c054f4eb9171220c76169aa40a9e2 (diff)
downloadgcc-9fc91982f25c892710a0a8a00ab9d69a30481285.zip
gcc-9fc91982f25c892710a0a8a00ab9d69a30481285.tar.gz
gcc-9fc91982f25c892710a0a8a00ab9d69a30481285.tar.bz2
exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit raise of CE...
2010-06-14 Jerome Lambourg <lambourg@adacore.com> * exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit raise of CE, SE and PE have the reason correctly set and are properly expanded before stopping the expansions of .NET/JVM exceptions. From-SVN: r160747
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/exp_ch11.adb18
2 files changed, 15 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 78ebd92..8f28a3c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-14 Jerome Lambourg <lambourg@adacore.com>
+
+ * exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit
+ raise of CE, SE and PE have the reason correctly set and are properly
+ expanded before stopping the expansions of .NET/JVM exceptions.
+
2010-06-14 Robert Dewar <dewar@adacore.com>
* opt.ads (Check_Policy_List): Add some clarifying comments
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 21f878b..3978e94 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1516,15 +1516,6 @@ package body Exp_Ch11 is
-- Remaining processing is for the case where no string expression
-- is present.
- -- There is no expansion needed for statement "raise <exception>;" when
- -- compiling for the JVM since the JVM has a built-in exception
- -- mechanism. However we need to keep the expansion for "raise;"
- -- statements. See 4jexcept.ads for details.
-
- if Present (Name (N)) and then VM_Target /= No_VM then
- return;
- end if;
-
-- 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.
@@ -1564,6 +1555,15 @@ package body Exp_Ch11 is
end if;
end if;
+ -- There is no expansion needed for statement "raise <exception>;" when
+ -- compiling for the JVM since the JVM has a built-in exception
+ -- mechanism. However we need to keep the expansion for "raise;"
+ -- statements. See 4jexcept.ads for details.
+
+ if Present (Name (N)) and then VM_Target /= No_VM then
+ return;
+ end if;
+
-- Case of name present, in this case we expand raise name to
-- Raise_Exception (name'Identity, location_string);