2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / asmspecInvalid.C
blob4c528a0f8e11a978d3557d5df90fb57001690e69
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.  
5 //
6 // Contributed by Robert Bowdidge (bowdidge@apple.com) 14 Oct 2003
8 // { dg-do compile }
10 struct Foo {
11   // This should reference a variable called bar
12   int i __asm__("bar");  /* { dg-error "specifiers are not permitted" } */
15 int main (void ) {
16   int j = 0;
17   return j;