Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | \ |
| 2 | ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f |
| 3 | ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t |
Dan Gohman | 8c89a50 | 2007-08-15 13:36:28 +0000 | [diff] [blame^] | 4 | ; RUN: grep piclabel %t | count 3 |
| 5 | ; RUN: grep PLT %t | count 1 |
| 6 | ; RUN: grep GOT %t | count 1 |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | ; RUN: not grep GOTOFF %t |
| 8 | |
| 9 | @pfoo = external global void(...)* |
| 10 | |
| 11 | define void @bar() { |
| 12 | entry: |
| 13 | %tmp = call void(...)*(...)* @afoo() |
| 14 | store void(...)* %tmp, void(...)** @pfoo |
| 15 | %tmp1 = load void(...)** @pfoo |
| 16 | call void(...)* %tmp1() |
| 17 | br label %return |
| 18 | return: |
| 19 | ret void |
| 20 | } |
| 21 | |
| 22 | declare void(...)* @afoo(...) |