OSDN Git Service

PR c++/56162
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jan 2013 16:34:14 +0000 (16:34 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jan 2013 16:34:14 +0000 (16:34 +0000)
PR c++/56104
* typeck.c (get_member_function_from_ptrfunc): Fix
ptrmemfunc_vbit_in_delta case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195614 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 65157e1..7bd5402 100644 (file)
@@ -1,3 +1,10 @@
+2013-01-31  Jason Merrill  <jason@redhat.com>
+
+       PR c++/56162
+       PR c++/56104
+       * typeck.c (get_member_function_from_ptrfunc): Fix
+       ptrmemfunc_vbit_in_delta case.
+
 2013-01-29  Jason Merrill  <jason@redhat.com>
 
        PR libstdc++/54314
index bfac394..688c266 100644 (file)
@@ -3176,9 +3176,7 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function,
       e3 = pfn_from_ptrmemfunc (function);
       delta = delta_from_ptrmemfunc (function);
       idx = build1 (NOP_EXPR, vtable_index_type, e3);
-      if (nonvirtual)
-       e1 = integer_zero_node;
-      else switch (TARGET_PTRMEMFUNC_VBIT_LOCATION)
+      switch (TARGET_PTRMEMFUNC_VBIT_LOCATION)
        {
        case ptrmemfunc_vbit_in_pfn:
          e1 = cp_build_binary_op (input_location,