diff mbox series

ipa/94245 - avoid folding when we want an ADDR_EXPR

Message ID nycvar.YFH.7.76.2003230938020.5137@zhemvz.fhfr.qr
State New
Headers show
Series ipa/94245 - avoid folding when we want an ADDR_EXPR | expand

Commit Message

Richard Biener March 23, 2020, 8:38 a.m. UTC
Another case where build_fold_addr_expr is harmful.

Bootstrap/regtest running on x86_64-unknown-linux-gnu.

2020-03-23  Richard Biener  <rguenther@suse.de>

	PR ipa/94245
	* ipa-prop.c (ipa_read_jump_function): Build the ADDR_EXRP
	directly rather than also folding it via build_fold_addr_expr.
---
 gcc/ipa-prop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index a77130ded39..71ac0e104d2 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -4625,7 +4625,7 @@  ipa_read_jump_function (class lto_input_block *ib,
       {
 	tree t = stream_read_tree (ib, data_in);
 	if (flag && prevails)
-	  t = build_fold_addr_expr (t);
+	  t = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (t)), t);
 	ipa_set_jf_constant (jump_func, t, cs);
       }
       break;