2007-04-16 06:20:47 +08:00
|
|
|
; RUN: llvm-as < %s | \
|
|
|
|
; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
|
|
|
|
; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
|
2007-08-15 21:36:28 +08:00
|
|
|
; RUN: grep piclabel %t | count 3
|
|
|
|
; RUN: grep PLT %t | count 1
|
|
|
|
; RUN: grep GOT %t | count 1
|
2007-04-17 01:36:08 +08:00
|
|
|
; RUN: not grep GOTOFF %t
|
2007-01-13 03:20:47 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
@pfoo = external global void(...)*
|
2007-01-13 03:20:47 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define void @bar() {
|
2007-01-13 03:20:47 +08:00
|
|
|
entry:
|
2007-01-26 16:25:06 +08:00
|
|
|
%tmp = call void(...)*(...)* @afoo()
|
|
|
|
store void(...)* %tmp, void(...)** @pfoo
|
|
|
|
%tmp1 = load void(...)** @pfoo
|
2007-01-13 03:20:47 +08:00
|
|
|
call void(...)* %tmp1()
|
|
|
|
br label %return
|
|
|
|
return:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
declare void(...)* @afoo(...)
|