From: Eric Botcazou Date: Tue, 13 Nov 2018 09:03:34 +0000 (+0000) Subject: misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions for the runtime on platforms... X-Git-Tag: releases/gcc-7.4.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=805bbc611e60f0b9acc958120e250413d237c2a5;p=thirdparty%2Fgcc.git 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: r266059 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7f5333f79d6b..d709c3671827 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-11-13 Eric Botcazou + + * 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 * fe.h (Suppress_Checks): Declare. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index c9f1c7455315..d3f88d33475c 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -409,10 +409,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;