URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// tests that the asm directive is correctly handled for static fields
|
// tests that the asm directive is correctly handled for static fields
|
// in structures and classes. This only applies to C++; such
|
// in structures and classes. This only applies to C++; such
|
// directives generate errors in C. Assembler directives for local
|
// directives generate errors in C. Assembler directives for local
|
// variables should be tested by the C test suite.
|
// variables should be tested by the C test suite.
|
//
|
//
|
// Contributed by Robert Bowdidge (bowdidge@apple.com) 14 Oct 2003
|
// Contributed by Robert Bowdidge (bowdidge@apple.com) 14 Oct 2003
|
|
|
// { dg-do compile }
|
// { dg-do compile }
|
|
|
struct Foo {
|
struct Foo {
|
// This should reference a variable called bar
|
// This should reference a variable called bar
|
int i __asm__("bar"); /* { dg-error "specifiers are not permitted" } */
|
int i __asm__("bar"); /* { dg-error "specifiers are not permitted" } */
|
};
|
};
|
|
|
int main (void ) {
|
int main (void ) {
|
int j = 0;
|
int j = 0;
|
return j;
|
return j;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.