2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / asm2.C
blobb7e764808369307381c6b02279a19a852d0ceab5
1 // { dg-do assemble { target i?86-*-linux* } }
2 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
4 typedef void (function_ptr)(int);
6 void foo(int)
10 template<function_ptr ptr> void doit(int i)
12         __asm__("pushl %0\n\t"
13                   "call *%1\n\t"
14                   "popl %0"
15                   :
16                   : "a" (i), "b" (ptr));
19 void bar()
21         doit<foo>(123);