1010//@ compile-flags: -C opt-level=2 -Z merge-functions=disabled
1111
1212#![ crate_type = "lib" ]
13-
1413#![ allow( incomplete_features) ]
15-
1614#![ feature( unsized_locals, unsized_fn_params) ]
1715
18-
1916// CHECK-LABEL: emptyfn:
2017#[ no_mangle]
2118pub fn emptyfn ( ) {
@@ -139,7 +136,6 @@ pub fn local_var_addr_used_indirectly(f: fn(bool)) {
139136 // missing-NOT: __security_check_cookie
140137}
141138
142-
143139// CHECK-LABEL: local_string_addr_taken
144140#[ no_mangle]
145141pub fn local_string_addr_taken ( f : fn ( & String ) ) {
@@ -205,7 +201,7 @@ pub struct Gigastruct {
205201 not : u64 ,
206202 have : u64 ,
207203 array : u64 ,
208- members : u64
204+ members : u64 ,
209205}
210206
211207// CHECK-LABEL: local_large_var_moved
@@ -259,15 +255,13 @@ pub fn local_large_var_cloned(f: fn(Gigastruct)) {
259255 // EOF
260256 // ```
261257
262-
263258 // all: __security_check_cookie
264259 // strong: __security_check_cookie
265260 // basic: __security_check_cookie
266261 // none-NOT: __security_check_cookie
267262 // missing-NOT: __security_check_cookie
268263}
269264
270-
271265extern "C" {
272266 // A call to an external `alloca` function is *not* recognized as an
273267 // `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 ())) {
320314 // missing-NOT: __security_check_cookie
321315}
322316
323-
324317// CHECK-LABEL: alloca_dynamic_arg
325318#[ no_mangle]
326319pub fn alloca_dynamic_arg ( f : fn ( * mut ( ) ) , n : usize ) {
@@ -340,7 +333,6 @@ pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
340333// this is support for the "unsized locals" unstable feature:
341334// https://doc.rust-lang.org/unstable-book/language-features/unsized-locals.html.
342335
343-
344336// CHECK-LABEL: unsized_fn_param
345337#[ no_mangle]
346338pub 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])) {
354346 // alloca, and is therefore not protected by the `strong` or `basic`
355347 // heuristics.
356348
357-
358349 // We should have a __security_check_cookie call in `all` and `strong` modes but
359350 // LLVM does not support generating stack protectors in functions with funclet
360351 // based EH personalities.
0 commit comments