blob: 5cd6cf4b0f8b59205768bbb431e7255e329d1318 [file]
//@ revisions: all strong none
//@ ignore-nvptx64 stack protector not supported
//@ [all] compile-flags: -Z stack-protector=all -Z allow-partial-mitigations=stack-protector
//@ [strong] compile-flags: -Z stack-protector=strong -Z allow-partial-mitigations=stack-protector
#![crate_type = "lib"]
#[no_mangle]
pub fn foo() {
// CHECK: @foo() unnamed_addr #0
// all-NOT: attributes #0 = { {{.*}}sspstrong {{.*}} }
// all-NOT: attributes #0 = { {{.*}}ssp {{.*}} }
// all: attributes #0 = { {{.*}}sspreq {{.*}} }
// all-NOT: attributes #0 = { {{.*}}sspstrong {{.*}} }
// all-NOT: attributes #0 = { {{.*}}ssp {{.*}} }
// strong-NOT: attributes #0 = { {{.*}}sspreq {{.*}} }
// strong-NOT: attributes #0 = { {{.*}}ssp {{.*}} }
// strong: attributes #0 = { {{.*}}sspstrong {{.*}} }
// strong-NOT: attributes #0 = { {{.*}}sspreq {{.*}} }
// strong-NOT: attributes #0 = { {{.*}}ssp {{.*}} }
// none-NOT: attributes #0 = { {{.*}}sspreq {{.*}} }
// none-NOT: attributes #0 = { {{.*}}sspstrong {{.*}} }
// none-NOT: attributes #0 = { {{.*}}ssp {{.*}} }
}