]>
Commit | Line | Data |
---|---|---|
3ebc5c52 MM |
1 | // Build don't link: |
2 | // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch> | |
3 | // Skip if not target: i?86-*-linux* | |
4 | ||
5 | typedef void (function_ptr)(int); | |
6 | ||
7 | void foo(int) | |
8 | { | |
9 | } | |
10 | ||
11 | template<function_ptr ptr> void doit(int i) | |
12 | { | |
13 | __asm__("pushl %0\n\t" | |
14 | "call *%1\n\t" | |
15 | "popl %0" | |
16 | : | |
17 | : "a" (i), "b" (ptr)); | |
18 | } | |
19 | ||
20 | void bar() | |
21 | { | |
22 | doit<foo>(123); | |
23 | } |