public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2836] ada: Improve defense against illegal code in check for infinite loops
@ 2023-07-28 7:30 Marc Poulhi?s
0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-07-28 7:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cb3bed6018acae828f7a4828678c017c95f695f4
commit r14-2836-gcb3bed6018acae828f7a4828678c017c95f695f4
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Fri Jun 16 08:34:27 2023 +0200
ada: Improve defense against illegal code in check for infinite loops
Fix crash occurring when attribute System'To_Address is used without
a WITH clause for package System.
gcc/ada/
* sem_warn.adb (Check_Infinite_Loop_Warning): Don't look at the type of
actual parameter when it has no type at all, e.g. because the entire
subprogram call is illegal.
Diff:
---
gcc/ada/sem_warn.adb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 5dd7c17d4e2..7ecb4d9c4a6 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -591,7 +591,9 @@ package body Sem_Warn is
begin
Actual := First_Actual (N);
while Present (Actual) loop
- if Is_Access_Subprogram_Type (Etype (Actual)) then
+ if No (Etype (Actual))
+ or else Is_Access_Subprogram_Type (Etype (Actual))
+ then
return Abandon;
else
Next_Actual (Actual);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-28 7:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 7:30 [gcc r14-2836] ada: Improve defense against illegal code in check for infinite loops Marc Poulhi?s
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).