diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-11-13 09:02:33 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-11-13 09:02:33 +0000 |
commit | 77ece7f52e892587455b17e91e111d3316019b05 (patch) | |
tree | ebc2c38be14815fd0625aeab14ea87e52164c90b | |
parent | 0c1e0d63fe0ceabbd04384070f3b59f8bf50de09 (diff) | |
download | gcc-77ece7f52e892587455b17e91e111d3316019b05.zip gcc-77ece7f52e892587455b17e91e111d3316019b05.tar.gz gcc-77ece7f52e892587455b17e91e111d3316019b05.tar.bz2 |
misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions for the runtime on platforms where...
* gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
for the runtime on platforms where System.Machine_Overflow is true.
From-SVN: r266057
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ee8ba62..5577ddb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-11-13 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions + for the runtime on platforms where System.Machine_Overflow is true. + 2018-11-08 Eric Botcazou <ebotcazou@adacore.com> * fe.h (Suppress_Checks): Declare. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index eadbd36..53913c2 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -405,10 +405,15 @@ gnat_init_gcc_eh (void) as permitted in Ada. Turn off -faggressive-loop-optimizations because it may optimize away out-of-bound array accesses that we want to be able to catch. - If checks are disabled, we use the same settings as the C++ compiler. */ + If checks are disabled, we use the same settings as the C++ compiler, + except for the runtime on platforms where S'Machine_Overflow is true + because the runtime depends on FP (hardware) checks being properly + handled despite being compiled in -gnatp mode. */ flag_exceptions = 1; flag_delete_dead_exceptions = 1; - if (!Suppress_Checks) + if (Suppress_Checks) + flag_non_call_exceptions = Machine_Overflows_On_Target && GNAT_Mode; + else { flag_non_call_exceptions = 1; flag_aggressive_loop_optimizations = 0; |