summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/inline17.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/inline17.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/inline17.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline17.C b/gcc/testsuite/g++.old-deja/g++.other/inline17.C
new file mode 100644
index 000000000..b7890e7ef
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline17.C
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+// { dg-options "-O3" }
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+struct foo
+{
+ char a;
+ foo ();
+ void bar ();
+ void baz (char c);
+};
+
+void foo::baz (char c)
+{
+ if (c != a)
+ a = c;
+}
+
+void foo::bar ()
+{
+ baz (1);
+}