]>
git.proxmox.com Git - rustc.git/blob - src/test/assembly/nvptx-safe-naming.rs
1 // assembly-output: ptx-linker
2 // compile-flags: --crate-type cdylib
9 // aux-build: breakpoint-panic-handler.rs
10 extern crate breakpoint_panic_handler
;
12 // Verify function name doesn't contain unacceaptable characters.
13 // CHECK: .func (.param .b32 func_retval0) [[IMPL_FN:[a-zA-Z0-9$_]+square[a-zA-Z0-9$_]+]](
15 // CHECK-LABEL: .visible .entry top_kernel(
17 pub unsafe extern "ptx-kernel" fn top_kernel(a
: *const u32, b
: *mut u32) {
18 // CHECK: call.uni (retval0),
19 // CHECK-NEXT: [[IMPL_FN]]
20 *b
= deep
::private
::MyStruct
::new(*a
).square();
25 pub struct MyStruct
<T
>(T
);
28 pub fn new(a
: u32) -> Self {
33 pub fn square(&self) -> u32 {
34 self.0.wrapping_mul(self.0)