brintos

brintos / llvm-project-archived public Read only

0
0
Text · 842 B · 9ca0fd3 Raw
26 lines · plain
1; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s2; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s3; RUN: opt -passes=safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s4; RUN: opt -passes=safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s5 6@.str = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 17 8; Addr-of a casted pointer9;  safestack attribute10; Requires protector.11define void @foo() nounwind uwtable safestack {12entry:13  ; CHECK: __safestack_unsafe_stack_ptr14  %a = alloca ptr, align 815  %b = alloca ptr, align 816  %call = call ptr @getp()17  store ptr %call, ptr %a, align 818  store ptr %a, ptr %b, align 819  %0 = load ptr, ptr %b, align 820  call void @funfloat2(ptr %0)21  ret void22}23 24declare void @funfloat2(ptr)25declare ptr @getp()26