File tree 2 files changed +21
-0
lines changed
compiler/rustc_passes/src
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
516
516
sym:: no_mangle,
517
517
sym:: naked,
518
518
sym:: instruction_set,
519
+ sym:: repr,
519
520
// code generation
520
521
sym:: cold,
521
522
sym:: target_feature,
Original file line number Diff line number Diff line change
1
+ //@ compile-flags: -C no-prepopulate-passes -Copt-level=0
2
+ //@ needs-asm-support
3
+ //@ ignore-arm no "ret" mnemonic
4
+
5
+ #![ crate_type = "lib" ]
6
+ #![ feature( naked_functions, fn_align) ]
7
+ use std:: arch:: asm;
8
+
9
+ // CHECK: Function Attrs: naked
10
+ // CHECK-NEXT: define{{.*}}void @naked_empty()
11
+ // CHECK: align 16
12
+ #[ repr( align( 16 ) ) ]
13
+ #[ no_mangle]
14
+ #[ naked]
15
+ pub unsafe extern "C" fn naked_empty ( ) {
16
+ // CHECK-NEXT: start:
17
+ // CHECK-NEXT: call void asm
18
+ // CHECK-NEXT: unreachable
19
+ asm ! ( "ret" , options( noreturn) ) ;
20
+ }
You can’t perform that action at this time.
0 commit comments