summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 17:01:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 17:01:08 +0000
commita3a6d499c752fde6bf5e2ea88d1cf344d24e15a5 (patch)
tree1f015af4afa8c3718025ac862a9f9c29c76b5e0f /gcc/testsuite/g++.dg
parent6112b14ec09f73351806102dcbafe09b0cd20436 (diff)
downloadgcc-a3a6d499c752fde6bf5e2ea88d1cf344d24e15a5.tar.gz
PR lto/62026
* lto/pr62026.C: New testcase. * cgraphclones.c (duplicate_thunk_for_node): Get body to have args to duplicate. * lto-streamer-out.c (lto_output): Handle correctly thunks that was born at WPA time. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/lto/pr62026.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lto/pr62026.C b/gcc/testsuite/g++.dg/lto/pr62026.C
new file mode 100644
index 00000000000..63766a85b98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr62026.C
@@ -0,0 +1,22 @@
+// { dg-lto-do link }
+// { dg-lto-options {{-flto -O3 -r -nostdlib}} }
+class C;
+class F {
+ virtual C m_fn1();
+};
+class C {
+ public:
+ virtual int *m_fn3(int);
+};
+class G : F, C {
+ int offsets;
+ int *m_fn3(int);
+};
+C *a;
+int *G::m_fn3(int) {
+ if (offsets) return 0;
+}
+
+void fn1() {
+ for (;;) a->m_fn3(0);
+}