1 ; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
2 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
3 ; RUN: opt -passes=safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
4 ; RUN: opt -passes=safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
6 %struct.pair = type { i32, i32 }
8 @.str = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1
10 ; Addr-of a struct element passed into an invoke instruction.
11 ; (GEP followed by an invoke)
14 define i32 @foo() uwtable safestack personality ptr @__gxx_personality_v0 {
16 ; CHECK: __safestack_unsafe_stack_ptr
17 %c = alloca %struct.pair, align 4
18 %exn.slot = alloca ptr
19 %ehselector.slot = alloca i32
20 store i32 0, ptr %c, align 4
21 invoke void @_Z3exceptPi(ptr %c)
22 to label %invoke.cont unwind label %lpad
28 %0 = landingpad { ptr, i32 }
33 declare void @_Z3exceptPi(ptr)
34 declare i32 @__gxx_personality_v0(...)