diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-85461.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-85461.rs b/src/test/ui/issues/issue-85461.rs new file mode 100644 index 000000000..965510887 --- /dev/null +++ b/src/test/ui/issues/issue-85461.rs @@ -0,0 +1,27 @@ +// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 +// build-pass +// needs-profiler-support + +// Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries +// with dead code and #[inline(always)]. + +#![allow(dead_code)] + +mod foo { + #[inline(always)] + pub fn called() { } + + fn uncalled() { } +} + +pub mod bar { + pub fn call_me() { + super::foo::called(); + } +} + +pub mod baz { + pub fn call_me() { + super::foo::called(); + } +} |