Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.pt / asm2.C
blob90e494bf55cbf2feffbec6e0f0fbc26228ea14fb
1 // { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
2 // { dg-require-effective-target ilp32 }
3 // We'd use ebx with -fpic/-fPIC, so skip.
4 // { dg-skip-if "" { *-*-* } { "-fpic" "-fPIC" } { "" } }
5 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
7 typedef void (function_ptr)(int);
9 void foo(int)
13 template<function_ptr ptr> void doit(int i)
15         __asm__("pushl %0\n\t"
16                   "call *%1\n\t"
17                   "popl %0"
18                   :
19                   : "a" (i), "b" (ptr));
22 void bar()
24         doit<foo>(123);