https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994
--- Comment #7 from Ilya Enkovich <enkovich.gnu at gmail dot com> --- (In reply to rguent...@suse.de from comment #6) > I see. I mainly wonder because of LTO which can combine TUs from C > and Ada and because for example both Fortran and Ada define > interoperability with C. All languages also share the common > C runtime builtins. > > Richard. It should be OK to mix instrumented and not instrumented codes. Instrumentation happens in early passes before LTO streams out. Therefore we can compile C file with '-fcheck-pointer-bounds -mmpx -flto -c', then compile fortran (or any other) file with '-c -flto' and finally pass generated objects to LTO. It may be inconvenient to avoid '-fcheck-pointer-bounds' for nonc-C files when you work with mixed codes. To handle it I may use langhooks and ignore '-fcheck-pointer-bounds' when it's not supported for used language.