summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/mangle1.C
blob: de5e96588b3e79ac6a474629dfdbd491ec1fa424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// { dg-do assemble  }
// { dg-options "" }

// Make sure the typedef name is used in name mangling, not some random
// anonymous name

struct foo {
  typedef enum { red } color;
  void bar(color r) {
  }
} f;

#ifdef sparc
void f1() asm("bar__3fooQ23foo3$_0");
void f1() {
}
void f2() asm("_bar__3fooQ23foo3$_0");
void f2() {
}
void f3() asm("__bar__3fooQ23foo3$_0");
void f3() {
}
#endif

main() {
  f.bar(foo::red);
}