aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/mangle3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/mangle3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/mangle3.C41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/mangle3.C b/gcc/testsuite/g++.old-deja/g++.other/mangle3.C
new file mode 100644
index 00000000000..d77a4b548de
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/mangle3.C
@@ -0,0 +1,41 @@
+struct foo {
+ static int bar ()
+ {
+ int i;
+ static int baz = 1;
+ {
+ static int baz = 2;
+ i = baz++;
+ }
+ {
+ struct baz {
+ static int m ()
+ {
+ static int n;
+ return n += 10;
+ }
+ };
+ baz a;
+ i += a.m ();
+ }
+ {
+ static int baz = 3;
+ i += baz;
+ baz += 30;
+ }
+ i += baz;
+ baz += 60;
+ return i;
+ }
+};
+
+int main ()
+{
+ foo x;
+
+ if (x.bar () != 16)
+ return 1;
+ if (x.bar() != 117)
+ return 1;
+ return 0;
+}