public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] analyzer: Fix type of ADDR_EXPR
@ 2022-05-05 12:07 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-05 12:07 UTC (permalink / raw)
  To: gcc-cvs

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);
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-05 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:07 [gcc(refs/vendors/ARM/heads/morello)] analyzer: Fix type of ADDR_EXPR Matthew Malcomson

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).