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