gcc/testsuite/g++.old-deja/g++.mike/mangle1.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "" } |
| 3 | |
| 4 | // Make sure the typedef name is used in name mangling, not some random |
| 5 | // anonymous name |
| 6 | |
| 7 | struct foo { |
| 8 | typedef enum { red } color; |
| 9 | void bar(color r) { |
| 10 | } |
| 11 | } f; |
| 12 | |
| 13 | #ifdef sparc |
| 14 | void f1() asm("bar__3fooQ23foo3$_0"); |
| 15 | void f1() { |
| 16 | } |
| 17 | void f2() asm("_bar__3fooQ23foo3$_0"); |
| 18 | void f2() { |
| 19 | } |
| 20 | void f3() asm("__bar__3fooQ23foo3$_0"); |
| 21 | void f3() { |
| 22 | } |
| 23 | #endif |
| 24 | |
| 25 | int |
| 26 | main() { |
| 27 | f.bar(foo::red); |
| 28 | } |