public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4813] fold: fix use of protected_set_expr_location_unshare
@ 2022-12-21 2:11 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-12-21 2:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ef0abcbc400e0ecb8ed1ddf61d96f8f3f88fe63b
commit r13-4813-gef0abcbc400e0ecb8ed1ddf61d96f8f3f88fe63b
Author: Jason Merrill <jason@redhat.com>
Date: Tue Dec 20 21:06:09 2022 -0500
fold: fix use of protected_set_expr_location_unshare
Unlike protected_set_expr_location, this variant can return
a different tree.
gcc/ChangeLog:
* fold-const.cc (fold_convert_loc): Check return value of
protected_set_expr_location_unshare.
Diff:
---
gcc/fold-const.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc
index 42547f433ed..00e2af0680c 100644
--- a/gcc/fold-const.cc
+++ b/gcc/fold-const.cc
@@ -2618,7 +2618,7 @@ fold_convert_loc (location_t loc, tree type, tree arg)
gcc_unreachable ();
}
fold_convert_exit:
- protected_set_expr_location_unshare (tem, loc);
+ tem = protected_set_expr_location_unshare (tem, loc);
return tem;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-21 2:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 2:11 [gcc r13-4813] fold: fix use of protected_set_expr_location_unshare Jason Merrill
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).