2022-12-01 18:00:00 -06:00
|
|
|
// Checks that naked functions are not instrumented by -Cinstrument-coverage.
|
|
|
|
// Regression test for issue #105170.
|
|
|
|
//
|
|
|
|
//@ needs-asm-support
|
2024-03-16 01:02:30 -05:00
|
|
|
//@ compile-flags: -Zno-profiler-runtime
|
2022-12-01 18:00:00 -06:00
|
|
|
//@ compile-flags: -Cinstrument-coverage
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(naked_functions)]
|
2024-09-05 06:45:26 -05:00
|
|
|
use std::arch::naked_asm;
|
2022-12-01 18:00:00 -06:00
|
|
|
|
|
|
|
#[naked]
|
|
|
|
#[no_mangle]
|
|
|
|
pub unsafe extern "C" fn f() {
|
2023-06-14 05:31:00 -05:00
|
|
|
// CHECK: define {{(dso_local )?}}void @f()
|
2022-12-01 18:00:00 -06:00
|
|
|
// CHECK-NEXT: start:
|
|
|
|
// CHECK-NEXT: call void asm
|
|
|
|
// CHECK-NEXT: unreachable
|
2024-09-05 06:45:26 -05:00
|
|
|
naked_asm!("");
|
2022-12-01 18:00:00 -06:00
|
|
|
}
|