summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-10 16:38:31 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-10 16:38:31 +0000
commit17bbda62d4a55c18b2006850e52de30f7fd89ef8 (patch)
tree9fb7c639432aed1256e3d0c328b87087c60e352a
parent8ef29c926ac44b7f2acc6f8ea9b49ba2dad835d3 (diff)
downloadgcc-17bbda62d4a55c18b2006850e52de30f7fd89ef8.tar.gz
PR ipa/64982
* cgraphunit.c (cgraph_node::expand_thunk): Look for stdarg thunks. * method.c (use_thunk): Do not check for stdarg thunks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220587 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cgraphunit.c8
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/method.c14
4 files changed, 19 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 50fa380fe06..5da067e2495 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-10 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/64982
+ * cgraphunit.c (cgraph_node::expand_thunk): Look for stdarg
+ thunks.
+
2015-02-10 Trevor Saunders <tsaunders@mozilla.com>
PR tree-optimization/64326
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 8280fc4a1a3..48a4b35a938 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1559,6 +1559,14 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
thunk.thunk_p = false;
analyzed = false;
}
+ else if (stdarg_p (TREE_TYPE (thunk_fndecl)))
+ {
+ error ("generic thunk code fails for method %qD which uses %<...%>",
+ thunk_fndecl);
+ TREE_ASM_WRITTEN (thunk_fndecl) = 1;
+ analyzed = true;
+ return false;
+ }
else
{
tree restype;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 37ce9098c10..7e282d83f51 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-10 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/64982
+ * method.c (use_thunk): Do not check for stdarg thunks.
+
2015-02-06 Jason Merrill <jason@redhat.com>
PR c++/64899
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index aeb3791022f..33e2f3cb52f 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -418,20 +418,6 @@ use_thunk (tree thunk_fndecl, bool emit_p)
if (DECL_ONE_ONLY (function))
thunk_node->add_to_same_comdat_group (funcn);
- if (!this_adjusting
- || !targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset,
- virtual_value, alias))
- {
- /* If this is a covariant thunk, or we don't have the necessary
- code for efficient thunks, generate a thunk function that
- just makes a call to the real function. Unfortunately, this
- doesn't work for varargs. */
-
- if (varargs_function_p (function))
- error ("generic thunk code fails for method %q#D which uses %<...%>",
- function);
- }
-
pop_from_top_level ();
}