diff options
| author | bors <bors@rust-lang.org> | 2022-12-12 16:00:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-12 16:00:14 +0000 |
| commit | 69f9c33d71c871fc16ac445211281c6e7a340943 (patch) | |
| tree | 348cdcec6049f68be8c2618d727b2facd1ccb857 /src/test/codegen-units/item-collection/asm-sym.rs | |
| parent | 0040709e39bfa159d099ee14628ad4ac72f91406 (diff) | |
| parent | c9aa73c3b141d04aeffe7ff359f0fe2d642ff2b1 (diff) | |
| download | rust-1.66.0.tar.gz rust-1.66.0.zip | |
Auto merge of #105563 - pietroalbini:pa-stable-1.66.0, r=pietroalbini 1.66.0
[stable] Prepare 1.66.0 release This PR prepares the artifacts for the 1.66.0 release. The following PRs have been backported: * #104782 * #105023 * #104558 * #104610 * #103989 * #104650 * #105539 * #105477 r? `@ghost`
Diffstat (limited to 'src/test/codegen-units/item-collection/asm-sym.rs')
| -rw-r--r-- | src/test/codegen-units/item-collection/asm-sym.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/codegen-units/item-collection/asm-sym.rs b/src/test/codegen-units/item-collection/asm-sym.rs new file mode 100644 index 00000000000..8bafb95bc16 --- /dev/null +++ b/src/test/codegen-units/item-collection/asm-sym.rs @@ -0,0 +1,20 @@ +// needs-asm-support +// compile-flags: -Ccodegen-units=1 -Zprint-mono-items=lazy --crate-type=lib + +#[inline(always)] +pub unsafe fn f() { + //~ MONO_ITEM static f::S @@ asm_sym-cgu.0[External] + static S: usize = 1; + //~ MONO_ITEM fn f::fun @@ asm_sym-cgu.0[External] + fn fun() {} + core::arch::asm!("/* {0} {1} */", sym S, sym fun); +} + +//~ MONO_ITEM fn g @@ asm_sym-cgu.0[External] +pub unsafe fn g() { + //~ MONO_ITEM static g::S @@ asm_sym-cgu.0[Internal] + static S: usize = 2; + //~ MONO_ITEM fn g::fun @@ asm_sym-cgu.0[Internal] + fn fun() {} + core::arch::asm!("/* {0} {1} */", sym S, sym fun); +} |
