10
10
//@ compile-flags: -C opt-level=2 -Z merge-functions=disabled
11
11
12
12
#![ crate_type = "lib" ]
13
-
14
13
#![ allow( incomplete_features) ]
15
-
16
14
#![ feature( unsized_locals, unsized_fn_params) ]
17
15
18
-
19
16
// CHECK-LABEL: emptyfn:
20
17
#[ no_mangle]
21
18
pub fn emptyfn ( ) {
@@ -139,7 +136,6 @@ pub fn local_var_addr_used_indirectly(f: fn(bool)) {
139
136
// missing-NOT: __security_check_cookie
140
137
}
141
138
142
-
143
139
// CHECK-LABEL: local_string_addr_taken
144
140
#[ no_mangle]
145
141
pub fn local_string_addr_taken ( f : fn ( & String ) ) {
@@ -205,7 +201,7 @@ pub struct Gigastruct {
205
201
not : u64 ,
206
202
have : u64 ,
207
203
array : u64 ,
208
- members : u64
204
+ members : u64 ,
209
205
}
210
206
211
207
// CHECK-LABEL: local_large_var_moved
@@ -259,15 +255,13 @@ pub fn local_large_var_cloned(f: fn(Gigastruct)) {
259
255
// EOF
260
256
// ```
261
257
262
-
263
258
// all: __security_check_cookie
264
259
// strong: __security_check_cookie
265
260
// basic: __security_check_cookie
266
261
// none-NOT: __security_check_cookie
267
262
// missing-NOT: __security_check_cookie
268
263
}
269
264
270
-
271
265
extern "C" {
272
266
// A call to an external `alloca` function is *not* recognized as an
273
267
// `alloca(3)` operation. This function is a compiler built-in, as the
@@ -320,7 +314,6 @@ pub fn alloca_large_compile_time_constant_arg(f: fn(*mut ())) {
320
314
// missing-NOT: __security_check_cookie
321
315
}
322
316
323
-
324
317
// CHECK-LABEL: alloca_dynamic_arg
325
318
#[ no_mangle]
326
319
pub fn alloca_dynamic_arg ( f : fn ( * mut ( ) ) , n : usize ) {
@@ -340,7 +333,6 @@ pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
340
333
// this is support for the "unsized locals" unstable feature:
341
334
// https://doc.rust-lang.org/unstable-book/language-features/unsized-locals.html.
342
335
343
-
344
336
// CHECK-LABEL: unsized_fn_param
345
337
#[ no_mangle]
346
338
pub fn unsized_fn_param ( s : [ u8 ] , l : bool , f : fn ( [ u8 ] ) ) {
@@ -354,7 +346,6 @@ pub fn unsized_fn_param(s: [u8], l: bool, f: fn([u8])) {
354
346
// alloca, and is therefore not protected by the `strong` or `basic`
355
347
// heuristics.
356
348
357
-
358
349
// We should have a __security_check_cookie call in `all` and `strong` modes but
359
350
// LLVM does not support generating stack protectors in functions with funclet
360
351
// based EH personalities.
0 commit comments