diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-27 11:40:22 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-27 11:40:22 +0000 |
commit | cb06ace2241e2aa8a65ccbac3cb54c1e6a263cc7 (patch) | |
tree | 6f3af14f8d15b876ebaea3378c9fae2c39dd2cda /gcc/testsuite/g++.dg/ubsan | |
parent | d09768a4b0cde454ba5e81b84bf3177310deae1c (diff) | |
download | gcc-cb06ace2241e2aa8a65ccbac3cb54c1e6a263cc7.tar.gz |
PR sanitizer/59306
* ubsan.c (instrument_null): Use gimple_store_p/gimple_assign_load_p
instead of walk_gimple_op.
(ubsan_pass): Adjust. Call instrument_null only if SANITIZE_NULL.
testsuite/
* g++.dg/ubsan/pr59306.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205443 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/ubsan')
-rw-r--r-- | gcc/testsuite/g++.dg/ubsan/pr59306.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59306.C b/gcc/testsuite/g++.dg/ubsan/pr59306.C new file mode 100644 index 00000000000..426e6a5bd5f --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/pr59306.C @@ -0,0 +1,14 @@ +// { dg-do compile } +// { dg-options "-fsanitize=undefined" } +// { dg-skip-if "" { *-*-* } { "-flto" } { "" } } + +class A { + void bar (void (A::*) (int)); + void foo (int); + void B (); +}; + +void A::B() +{ + bar (&A::foo); +} |