diff options
author | Marek Polacek <polacek@redhat.com> | 2017-03-28 08:13:04 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2017-03-28 08:13:04 +0000 |
commit | 72785f26600ba08db98c6f169e59e66fe09a81f3 (patch) | |
tree | 9cace1daa7a9728317f6e23bdfbed367ec88efcb /gcc/fold-const.c | |
parent | b1bd91584338e543ae7f6e7be707e6a2333f0c6d (diff) | |
download | gcc-72785f26600ba08db98c6f169e59e66fe09a81f3.zip gcc-72785f26600ba08db98c6f169e59e66fe09a81f3.tar.gz gcc-72785f26600ba08db98c6f169e59e66fe09a81f3.tar.bz2 |
re PR sanitizer/80067 (ICE in fold_comparison with -fsanitize=undefined)
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.
From-SVN: r246521
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1a9a264..6db16b5 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); |