summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ipa/pr60640-1.C
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-10 04:13:42 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-10 04:13:42 -0800
commit9547f24e09cb9cf4db70f0ad308d2f03015c7d81 (patch)
tree16b168d8b010c84e72d37f9aa22e216d5a2a8b3d /gcc/testsuite/g++.dg/ipa/pr60640-1.C
parent5a28f86b322357cb07d2ae3a42fa39f0749cf9f2 (diff)
parentae10eb82fe34c18640ad65c2ab94ffc53f349315 (diff)
downloadgcc-hjl/x32/gcc-4_7-branch.tar.gz
Merge remote-tracking branch 'origin/gcc-4_7-branch' into hjl/x32/gcc-4_7-branchhjl/x32/gcc-4_7-branch
Diffstat (limited to 'gcc/testsuite/g++.dg/ipa/pr60640-1.C')
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-1.C50
1 files changed, 50 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-1.C b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
new file mode 100644
index 00000000000..7a0b91893f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+class ASN1Object
+{
+public:
+ virtual ~ASN1Object ();
+};
+class A
+{
+ virtual unsigned m_fn1 () const;
+};
+class B
+{
+public:
+ ASN1Object Element;
+ virtual unsigned m_fn1 (bool) const;
+};
+template <class BASE> class C : public BASE
+{
+};
+
+class D : ASN1Object, public B
+{
+};
+class G : public D
+{
+ unsigned m_fn1 (bool) const {}
+};
+class F : A
+{
+public:
+ F (A);
+ unsigned m_fn1 () const
+ {
+ int a;
+ a = m_fn2 ().m_fn1 (0);
+ return a;
+ }
+ const B &m_fn2 () const { return m_groupParameters; }
+ C<G> m_groupParameters;
+};
+template <class D> void BenchMarkKeyAgreement (int *, int *, int)
+{
+ A f;
+ D d (f);
+}
+
+void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); }
+