summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-28 08:13:04 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-28 08:13:04 +0000
commite4a4e01f6333b3c0f6657f0d3a5767f6adbb7bae (patch)
tree9cace1daa7a9728317f6e23bdfbed367ec88efcb /gcc/fold-const.c
parentadc10b0c963f1273f9309303338cfe7481f53a45 (diff)
downloadgcc-e4a4e01f6333b3c0f6657f0d3a5767f6adbb7bae.tar.gz
PR sanitizer/80067
* fold-const.c (fold_comparison): Use protected_set_expr_location instead of SET_EXPR_LOCATION. * c-c++-common/ubsan/shift-10.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246521 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 1a9a264fc26..6db16b514f1 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -8704,7 +8704,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
if (save_p)
{
tem = save_expr (build2 (code, type, cval1, cval2));
- SET_EXPR_LOCATION (tem, loc);
+ protected_set_expr_location (tem, loc);
return tem;
}
return fold_build2_loc (loc, code, type, cval1, cval2);