public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4540] [Ada] Prevent use of an uninitialized AST field with universal integer Date: Wed, 20 Oct 2021 10:18:04 +0000 (GMT) [thread overview] Message-ID: <20211020101804.8D3F03858030@sourceware.org> (raw) 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
reply other threads:[~2021-10-20 10:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211020101804.8D3F03858030@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).