public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4540] [Ada] Prevent use of an uninitialized AST field with universal integer
@ 2021-10-20 10:18 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-20 10:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ff2746728050429684bf62729df798189cc1d396
commit r12-4540-gff2746728050429684bf62729df798189cc1d396
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Tue Oct 12 17:42:05 2021 +0200
[Ada] Prevent use of an uninitialized AST field with universal integer
gcc/ada/
* exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Guard
against equality of an uninitialized RM_Size field.
Diff:
---
gcc/ada/exp_spark.adb | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb
index bbfee622969..bce745b2690 100644
--- a/gcc/ada/exp_spark.adb
+++ b/gcc/ada/exp_spark.adb
@@ -451,6 +451,7 @@ package body Exp_SPARK is
Apply_Universal_Integer_Attribute_Checks (N);
if Present (Typ)
+ and then Known_RM_Size (Typ)
and then RM_Size (Typ) = RM_Size (Standard_Long_Long_Integer)
then
-- ??? This should rather be a range check, but this would
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-20 10:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 10:18 [gcc r12-4540] [Ada] Prevent use of an uninitialized AST field with universal integer 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).