From 9ff488f0292841a709840b6d2cb4d18e2f1b491a Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Tue, 7 Jan 2020 17:39:31 +0100 Subject: [PATCH] [Ada] Fix missing overflow checks in analysis of predefined unit 2020-06-03 Yannick Moy gcc/ada/ * inline.adb (Expand_Inlined_Call): Do not suppress checks on inlined code in GNATprove mode. --- gcc/ada/inline.adb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index b6e6a27d185..e49b83e88a0 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4103,7 +4103,15 @@ package body Inline is Reset_Dispatching_Calls (Blk); - Analyze (Blk, Suppress => All_Checks); + -- In GNATprove mode, always consider checks on, even for + -- predefined units. + + if GNATprove_Mode then + Analyze (Blk); + else + Analyze (Blk, Suppress => All_Checks); + end if; + Style_Check := Style; end; -- 2.30.2