aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-01-11 21:30:47 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-01-11 21:30:47 -0500
commitefcc9293a66671758a373804b60e7bb9517b8eac (patch)
tree9981dff1e612d221af04881c381213633dfa0578 /gcc/cp/call.c
parent00733a00417dbd433152c3ceaadd78a6edf77730 (diff)
downloadgcc-efcc9293a66671758a373804b60e7bb9517b8eac.zip
gcc-efcc9293a66671758a373804b60e7bb9517b8eac.tar.gz
gcc-efcc9293a66671758a373804b60e7bb9517b8eac.tar.bz2
re PR c++/51565 (fastcall in array of method pointers: internal compiler error)
PR c++/51565 * call.c (standard_conversion): For ptrmemfuncs, compare the static_fn_types. From-SVN: r183120
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 57b1765..f7cfbd0 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1274,10 +1274,8 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
tree tbase = class_of_this_parm (tofn);
if (!DERIVED_FROM_P (fbase, tbase)
- || !same_type_p (TREE_TYPE (fromfn), TREE_TYPE (tofn))
- || !compparms (TREE_CHAIN (TYPE_ARG_TYPES (fromfn)),
- TREE_CHAIN (TYPE_ARG_TYPES (tofn)))
- || cp_type_quals (fbase) != cp_type_quals (tbase))
+ || !same_type_p (static_fn_type (fromfn),
+ static_fn_type (tofn)))
return NULL;
from = build_memfn_type (fromfn, tbase, cp_type_quals (tbase));