| Anton Korobeynikov | a0554d9 | 2007-01-12 19:20:47 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic && |
| 2 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ && |
| 3 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 && |
| 4 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 && |
| 5 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOT" | wc -l | grep 1 && |
| 6 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOTOFF" | wc -l | grep 0 |
| 7 | |
| Reid Spencer | ce38056 | 2007-01-26 08:25:06 +0000 | [diff] [blame^] | 8 | @pfoo = external global void(...)* |
| Anton Korobeynikov | a0554d9 | 2007-01-12 19:20:47 +0000 | [diff] [blame] | 9 | |
| Reid Spencer | ce38056 | 2007-01-26 08:25:06 +0000 | [diff] [blame^] | 10 | define void @bar() { |
| Anton Korobeynikov | a0554d9 | 2007-01-12 19:20:47 +0000 | [diff] [blame] | 11 | entry: |
| Reid Spencer | ce38056 | 2007-01-26 08:25:06 +0000 | [diff] [blame^] | 12 | %tmp = call void(...)*(...)* @afoo() |
| 13 | store void(...)* %tmp, void(...)** @pfoo |
| 14 | %tmp1 = load void(...)** @pfoo |
| Anton Korobeynikov | a0554d9 | 2007-01-12 19:20:47 +0000 | [diff] [blame] | 15 | call void(...)* %tmp1() |
| 16 | br label %return |
| 17 | return: |
| 18 | ret void |
| 19 | } |
| 20 | |
| Reid Spencer | ce38056 | 2007-01-26 08:25:06 +0000 | [diff] [blame^] | 21 | declare void(...)* @afoo(...) |