public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/morello)] analyzer: Fix type of ADDR_EXPR
Date: Thu,  5 May 2022 12:07:32 +0000 (GMT)	[thread overview]
Message-ID: <20220505120732.2E7B1385DC04@sourceware.org> (raw)

https://gcc.gnu.org/g:ac5e91ff786f436c3648df7121c9d5ab29d58f7b

commit ac5e91ff786f436c3648df7121c9d5ab29d58f7b
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Mon Apr 11 18:45:53 2022 +0100

    analyzer: Fix type of ADDR_EXPR
    
    The analyzer was creating an ADDR_EXPR with the type of the
    object whose address was being taken, rather than with the
    resulting pointer type.  This patch cherry-picks a fix from
    David Malcolm in 467a48205279cab368dbeb02879bbbbe4b721516.

Diff:
---
 gcc/analyzer/region-model.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 02bbfa54781..decd702dc4c 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -1881,7 +1881,7 @@ region_model::get_representative_path_var (const svalue *sval,
       const region *reg = ptr_sval->get_pointee ();
       if (path_var pv = get_representative_path_var (reg, visited))
 	return path_var (build1 (ADDR_EXPR,
-				 TREE_TYPE (sval->get_type ()),
+				 sval->get_type (),
 				 pv.m_tree),
 			 pv.m_stack_depth);
     }


                 reply	other threads:[~2022-05-05 12:07 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=20220505120732.2E7B1385DC04@sourceware.org \
    --to=matmal01@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: link
Be 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).