repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
asm2.C
blob
b7e764808369307381c6b02279a19a852d0ceab5
1
// { dg-do assemble { target i?86-*-linux* } }
2
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
3
4
typedef void (function_ptr)(int);
5
6
void foo(int)
7
{
8
}
9
10
template<function_ptr ptr> void doit(int i)
11
{
12
__asm__("pushl %0\n\t"
13
"call *%1\n\t"
14
"popl %0"
15
:
16
: "a" (i), "b" (ptr));
17
}
18
19
void bar()
20
{
21
doit<foo>(123);
22
}