Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / asm1.C
blob62787de9be18ac6c5d3ff94fd564218d8031884e
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 "" { i?86-*-* } { "-fpic" "-fPIC" } { "" } }
4 // Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
6 template<int i> int foo(int v)
8         __asm__ __volatile__("addl %1, %0" : "=a" (v) : "b" (i));
10         return v;
13 int bar(int i)
15         return foo<123>(i);