1 // tests that the asm directive is correctly handled for static fields
2 // in structures and classes. This only applies to C++; such
3 // directives generate errors in C. Assembler directives for local
4 // variables should be tested by the C test suite.
6 // Contributed by Robert Bowdidge (bowdidge@apple.com) 14 Oct 2003
11 // This should reference a variable called bar
12 static int i __asm__("bar");
18 static int i __asm__("theRealI");
19 static int j __asm__("theRealJ");
23 class Baz : public Bar {
25 static char *ptr __asm__ ("theRealString");
28 int main (int argc, char **argv) {
40 /* { dg-final {scan-assembler "bar"} } */
41 /* { dg-final {scan-assembler "theRealString"} } */
42 /* { dg-final {scan-assembler "theRealI" } } */
43 /* { dg-final {scan-assembler "theRealJ" } } */