public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6216] [Ada] Prevent early exits without restoring a global variable
@ 2020-12-17 10:51 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-17 10:51 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:96c1f71463d067012241179df71c5872cec7a765
commit r11-6216-g96c1f71463d067012241179df71c5872cec7a765
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Tue Dec 1 15:17:27 2020 +0100
[Ada] Prevent early exits without restoring a global variable
gcc/ada/
* sem_ch5.adb (Analyze_Case_Statement): Move modification of
Unblocked_Exit_Count after early return statements; fix typo in
comment.
Diff:
---
gcc/ada/sem_ch5.adb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 380d6017414..04fc9806c58 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1494,7 +1494,6 @@ package body Sem_Ch5 is
-- Start of processing for Analyze_Case_Statement
begin
- Unblocked_Exit_Count := 0;
Analyze (Exp);
-- The expression must be of any discrete type. In rare cases, the
@@ -1558,7 +1557,9 @@ package body Sem_Ch5 is
Exp_Type := Exp_Btype;
end if;
- -- Call instantiated procedures to analyzwe and check discrete choices
+ -- Call instantiated procedures to analyze and check discrete choices
+
+ Unblocked_Exit_Count := 0;
Analyze_Choices (Alternatives (N), Exp_Type);
Check_Choices (N, Alternatives (N), Exp_Type, Others_Present);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-17 10:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 10:51 [gcc r11-6216] [Ada] Prevent early exits without restoring a global variable Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).