8de6b767932c06a7a6131561cde51941eeb2dc2f
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / asm1.C
1 // { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
2 // We'd use ebx with -fpic/-fPIC, so skip.
3 // { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } }
4 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
5
6 template<int i> int foo(int v)
7 {
8 __asm__ __volatile__("addl %1, %0" : "=a" (v) : "b" (i));
9
10 return v;
11 }
12
13 int bar(int i)
14 {
15 return foo<123>(i);
16 }
17