middle-end/70090: Register __bdos for sanitizers if necessary
commit546c6210eb08f583ee4f53a0fd7886b6c958c7fa
authorSiddhesh Poyarekar <siddhesh@gotplt.org>
Wed, 11 May 2022 13:43:09 +0000 (11 19:13 +0530)
committerSiddhesh Poyarekar <siddhesh@gotplt.org>
Wed, 11 May 2022 13:43:09 +0000 (11 19:13 +0530)
tree7dfd892e7d6541a1e1b943cf5bdac901a509d64c
parenta92ed39c416b2a92f404d9851fdfea5cae7e6b21
middle-end/70090: Register __bdos for sanitizers if necessary

The asan initializer registers __builtin_object_size for languages that
don't have it, e.g. Fortran.  Register __builtin_dynamic_object_size too
(we need both because __builtin_dynamic_object_size computation may
involve generating __builtin_object_size as a fallback) so that
gfortran.dg/ubsan/bind-c-intent-out-2.f90 does not crash anymore.

gcc/ChangeLog:

PR middle-end/70090
* asan.cc (initialize_sanitizer_builtins): Register
__builtin_dynamic_object_size if necessary.

Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
gcc/asan.cc