2007-04-16 00:20:47 +02: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 15:36:28 +02:00
|
|
|
; RUN: grep piclabel %t | count 3
|
|
|
|
; RUN: grep PLT %t | count 1
|
|
|
|
; RUN: grep GOT %t | count 1
|
2007-04-16 19:36:08 +02:00
|
|
|
; RUN: not grep GOTOFF %t
|
2007-01-12 20:20:47 +01:00
|
|
|
|
2007-01-26 09:25:06 +01:00
|
|
|
@pfoo = external global void(...)*
|
2007-01-12 20:20:47 +01:00
|
|
|
|
2007-01-26 09:25:06 +01:00
|
|
|
define void @bar() {
|
2007-01-12 20:20:47 +01:00
|
|
|
entry:
|
2007-01-26 09:25:06 +01:00
|
|
|
%tmp = call void(...)*(...)* @afoo()
|
|
|
|
store void(...)* %tmp, void(...)** @pfoo
|
|
|
|
%tmp1 = load void(...)** @pfoo
|
2007-01-12 20:20:47 +01:00
|
|
|
call void(...)* %tmp1()
|
|
|
|
br label %return
|
|
|
|
return:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2007-01-26 09:25:06 +01:00
|
|
|
declare void(...)* @afoo(...)
|