summaryrefslogtreecommitdiff
path: root/test/ExecutionEngine/test-malloc.ll
blob: 7a7f245bf5cf042a747b80922da5970b1db66ca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
; RUN: lli %t.bc > /dev/null


int %main() {
   %X = malloc int                ; constant size
   %Y = malloc int, uint 100      ; constant size
   %u = add uint 1, 2
   %Z = malloc int, uint %u       ; variable size
   free int* %X
   free int* %Y
   free int* %Z
   ret int 0
}