PR sanitizer/65400
commita63cfc4dd7789b42ea2f6cedaa578341009dd83b
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Mar 2015 07:53:38 +0000 (19 07:53 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Mar 2015 07:53:38 +0000 (19 07:53 +0000)
treed66c13575e21970d004baf7ab6afa1494b91bd8b
parent86697850c2dd55d2ba18ae9499ed0cab772e6183
PR sanitizer/65400
* ipa-split.c (find_return_bb): Allow TSAN_FUNC_EXIT internal
call in the return bb.
(find_split_points): Add RETURN_BB argument, don't call
find_return_bb.
(split_function): Likewise.  Add ADD_TSAN_FUNC_EXIT argument,
if true append TSAN_FUNC_EXIT internal call after the call to
the split off function.
(execute_split_functions): Call find_return_bb here.
Don't optimize if TSAN_FUNC_EXIT is found in unexpected places.
Adjust find_split_points and split_function calls.

* c-c++-common/tsan/pr65400-1.c: New test.
* c-c++-common/tsan/pr65400-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221508 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ipa-split.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/tsan/pr65400-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/tsan/pr65400-2.c [new file with mode: 0644]