Skip to content

Commit 115685f

Browse files
committed
modified: tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-llvm.rs
1 parent b0f401c commit 115685f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-llvm.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![allow(internal_features)]
1414
#![feature(unsized_fn_params)]
1515

16-
1716
extern "C" {
1817
fn strcpy(dest: *mut u8, src: *const u8) -> *mut u8;
1918
fn printf(fmt: *const u8, ...) -> i32;
@@ -23,7 +22,7 @@ extern "C" {
2322
fn funfloat2(p: *mut *mut f64);
2423
fn testi_aux() -> f64;
2524
fn getp() -> *mut i32;
26-
fn dummy(_: ... ) -> i32;
25+
fn dummy(_: ...) -> i32;
2726

2827
static STR: [u8; 1];
2928
}
@@ -40,7 +39,7 @@ struct Pair {
4039

4140
#[repr(C)]
4241
struct Nest {
43-
first: Pair,
42+
first: Pair,
4443
second: Pair,
4544
}
4645

@@ -122,7 +121,6 @@ pub unsafe extern "C" fn test6() {
122121
// CHECK-LABEL: test7{{:|\[}}
123122
#[no_mangle]
124123
pub fn test7(a: i32) {
125-
126124
let ptr_val: usize = &a as *const i32 as usize;
127125

128126
unsafe {
@@ -390,11 +388,11 @@ pub unsafe extern "C" fn test21() {
390388
// Variable sized alloca(VLA): see https://github.com/rust-lang/rfcs/pull/1909
391389

392390
// CHECK-LABEL: test25{{:|\[}}
393-
#[no_mangle]
391+
#[no_mangle]
394392
pub unsafe extern "C" fn test25() -> i32 {
395393
let a: [i32; 4] = [0; 4];
396394

397-
let _whole = std::ptr::read_volatile(&a as *const _); // avoid array a from optimization
395+
let _whole = std::ptr::read_volatile(&a as *const _); // avoid array a from optimization
398396

399397
std::ptr::read_volatile(&a[0])
400398

@@ -407,10 +405,7 @@ pub unsafe extern "C" fn test25() -> i32 {
407405
// CHECK-LABEL: test26{{:|\[}}
408406
#[no_mangle]
409407
pub unsafe extern "C" fn test26() {
410-
let c = Nest {
411-
first: Pair { a: 10, b: 11 },
412-
second: Pair { a: 20, b: 21 },
413-
};
408+
let c = Nest { first: Pair { a: 10, b: 11 }, second: Pair { a: 20, b: 21 } };
414409

415410
let whole: Nest = std::ptr::read_volatile(&c);
416411

0 commit comments

Comments
 (0)