OSDN Git Service

* method.c (process_subob_fn): Make sure no_implicit_p is non-null
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jul 2012 01:37:07 +0000 (01:37 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jul 2012 01:37:07 +0000 (01:37 +0000)
before trying to store through it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189641 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/method.c

index 3711dc6..d567568 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-18  Jason Merrill  <jason@redhat.com>
+
+       * method.c (process_subob_fn): Make sure no_implicit_p is non-null
+       before trying to store through it.
+
 2012-07-17  Jason Merrill  <jason@redhat.com>
 
        PR c++/53995
index c46c372..c4947d1 100644 (file)
@@ -951,7 +951,7 @@ process_subob_fn (tree fn, bool move_p, tree *spec_p, bool *trivial_p,
 
   /* Core 1402: A non-trivial copy op suppresses the implicit
      declaration of the move ctor/op=.  */
-  if (move_p && !move_fn_p (fn) && !trivial_fn_p (fn))
+  if (no_implicit_p && move_p && !move_fn_p (fn) && !trivial_fn_p (fn))
     *no_implicit_p = true;
 
   if (constexpr_p && !DECL_DECLARED_CONSTEXPR_P (fn))