summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ipa
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 13:26:06 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 13:26:06 +0000
commit39c98dee75836f564a5efd5df7ca25cd5b6dcdbf (patch)
tree43d6d2e3c39272c10953c9024618ac52bea882be /gcc/testsuite/g++.dg/ipa
parent5f3ec3a3021ddbd003a5e188894bec1d61233670 (diff)
downloadgcc-39c98dee75836f564a5efd5df7ca25cd5b6dcdbf.tar.gz
PR ipa/61800
gcc/ * cgraph.h (cgraph_node::create_indirect_edge): Add compute_indirect_info param. * cgraph.c (cgraph_node::create_indirect_edge): Compute indirect_info only when it is required. * cgraphclones.c (cgraph_clone_edge): Do not recompute indirect_info fore cloned indirect edge. gcc/testsuite/ * g++.dg/ipa/pr61800.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/ipa')
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61800.C67
1 files changed, 67 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ipa/pr61800.C b/gcc/testsuite/g++.dg/ipa/pr61800.C
new file mode 100644
index 00000000000..b4da8992106
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61800.C
@@ -0,0 +1,67 @@
+/* PR ipa/61800 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#pragma GCC visibility push(hidden)
+class A
+{
+public:
+ unsigned long m_fn1 () const;
+};
+class B;
+class C
+{
+public:
+ ;
+ virtual bool m_fn2 (void) = 0;
+};
+class D
+{
+ virtual bool m_fn3 (const int &p1, B *p2) = 0;
+};
+class F : public D
+{
+ bool m_fn3 (const int &p1, B *p2);
+ A mPredicates;
+};
+class B
+{
+};
+class G : public B
+{
+ virtual unsigned int m_fn4 () = 0;
+};
+class H : public G
+{
+public:
+ int txNodeSetContext_aContextNodeSet;
+ H (B *p1) {}
+ int
+ m_fn5 ()
+ {
+ return mPosition < m_fn4 ();
+ }
+ unsigned int m_fn4 ();
+ unsigned int mPosition;
+};
+
+unsigned int a;
+C *b;
+bool
+F::m_fn3 (const int &p1, B *p2)
+{
+ if (!b->m_fn2 ())
+ return false;
+ unsigned int c = mPredicates.m_fn1 ();
+ for (1; 1 < c; ++a)
+ {
+ H d (p2);
+ while (d.m_fn5 ())
+ {
+ do
+ {
+ }
+ while (0);
+ }
+ }
+}