re PR sanitizer/85029 (-fsanitize=undefined internal compiler error: in maybe_optimiz...
authorJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Mar 2018 08:55:53 +0000 (09:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Mar 2018 08:55:53 +0000 (09:55 +0100)
commitee3a999fe7dfddb2531b045738ff2c0c40e6eb4c
tree2e79f430a07b923b744e3898689ee65e1e67c75d
parent631270a5cedfad8267a5e7b94901035212713b61
re PR sanitizer/85029 (-fsanitize=undefined internal compiler error: in maybe_optimize_ubsan_ptr_ifn, at sanopt.c:493)

PR sanitizer/85029
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
just don't try to optimize it rather than assert it never happens.

* g++.dg/ubsan/pr85029.C: New test.

From-SVN: r258794
gcc/ChangeLog
gcc/sanopt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr85029.C [new file with mode: 0644]