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/testsuite | |
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/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/ubsan/shift-10.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 086be29..93c9f9e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-28 Marek Polacek <polacek@redhat.com> + + PR sanitizer/80067 + * c-c++-common/ubsan/shift-10.c: New test. + 2017-03-27 Jeff Law <law@redhat.com> PR tree-optimization/80216 diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-10.c b/gcc/testsuite/c-c++-common/ubsan/shift-10.c new file mode 100644 index 0000000..9202fcc --- /dev/null +++ b/gcc/testsuite/c-c++-common/ubsan/shift-10.c @@ -0,0 +1,10 @@ +/* PR sanitizer/80067 */ +/* { dg-do compile } */ +/* { dg-options "-fsanitize=shift" } */ + +extern signed char a; +void +foo () +{ + 0 << ((647 > a) - 1); +} |