This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build/bootstrap failure on x86_64-linux


Andrew Pinski wrote:

This definetly looks like the wrong patch.
This is against EDG :).


Indeed. I hate it when my mail client isn't on the same machine as the file I'm trying to attach.

Here it is again.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com

? assign1.C
? test.int.c
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.640
diff -c -5 -p -r1.640 class.c
*** class.c	20 Jul 2004 02:46:37 -0000	1.640
--- class.c	20 Jul 2004 04:51:56 -0000
*************** add_implicitly_declared_members (tree t,
*** 2556,2566 ****
    /* If there is no assignment operator, one will be created if and
       when it is needed.  For now, just record whether or not the type
       of the parameter to the assignment operator will be a const or
       non-const reference.  */
    if (!TYPE_HAS_ASSIGN_REF (t) && !TYPE_FOR_JAVA (t))
!     TYPE_HAS_CONST_ASSIGN_REF (t) = !cant_have_const_assignment;
    
    /* Now, hook all of the new functions on to TYPE_METHODS,
       and add them to the CLASSTYPE_METHOD_VEC.  */
    for (f = &implicit_fns; *f; f = &TREE_CHAIN (*f))
      {
--- 2556,2570 ----
    /* If there is no assignment operator, one will be created if and
       when it is needed.  For now, just record whether or not the type
       of the parameter to the assignment operator will be a const or
       non-const reference.  */
    if (!TYPE_HAS_ASSIGN_REF (t) && !TYPE_FOR_JAVA (t))
!     {
!       TYPE_HAS_ASSIGN_REF (t) = 1;
!       TYPE_HAS_CONST_ASSIGN_REF (t) = !cant_have_const_assignment;
!       CLASSTYPE_LAZY_ASSIGNMENT_OP (t) = 1;
!     }
    
    /* Now, hook all of the new functions on to TYPE_METHODS,
       and add them to the CLASSTYPE_METHOD_VEC.  */
    for (f = &implicit_fns; *f; f = &TREE_CHAIN (*f))
      {
Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1015
diff -c -5 -p -r1.1015 cp-tree.h
*** cp-tree.h	20 Jul 2004 02:46:37 -0000	1.1015
--- cp-tree.h	20 Jul 2004 04:51:56 -0000
*************** struct lang_type_class GTY(())
*** 987,996 ****
--- 987,997 ----
    unsigned ptrmemfunc_flag : 1;
    unsigned was_anonymous : 1;
  
    unsigned lazy_default_ctor : 1;
    unsigned lazy_copy_ctor : 1;
+   unsigned lazy_assignment_op : 1;
    unsigned has_const_init_ref : 1;
    unsigned has_complex_init_ref : 1;
    unsigned has_complex_assign_ref : 1;
    unsigned non_aggregate : 1;
    unsigned java_interface : 1;
*************** struct lang_type_class GTY(())
*** 1000,1010 ****
       so, make sure to copy it in instantiate_class_template!  */
  
    /* There are some bits left to fill out a 32-bit word.  Keep track
       of this by updating the size of this bitfield whenever you add or
       remove a flag.  */
!   unsigned dummy : 9;
  
    tree primary_base;
    tree vfields;
    tree vcall_indices;
    tree vtables;
--- 1001,1011 ----
       so, make sure to copy it in instantiate_class_template!  */
  
    /* There are some bits left to fill out a 32-bit word.  Keep track
       of this by updating the size of this bitfield whenever you add or
       remove a flag.  */
!   unsigned dummy : 8;
  
    tree primary_base;
    tree vfields;
    tree vcall_indices;
    tree vtables;
*************** struct lang_type GTY(())
*** 1095,1104 ****
--- 1096,1110 ----
  /* Nonzero means that NODE (a class type) has a copy constructor --
     but that it has not yet been declared.  */
  #define CLASSTYPE_LAZY_COPY_CTOR(NODE) \
    (LANG_TYPE_CLASS_CHECK (NODE)->lazy_copy_ctor)
  
+ /* Nonzero means that NODE (a class type) has an assignment operator
+    -- but that it has not yet been declared.  */
+ #define CLASSTYPE_LAZY_ASSIGNMENT_OP(NODE) \
+   (LANG_TYPE_CLASS_CHECK (NODE)->lazy_assignment_op)
+ 
  /* Nonzero means that this _CLASSTYPE node overloads operator=(X&).  */
  #define TYPE_HAS_ASSIGN_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_assign_ref)
  
  /* True iff the class type NODE has an "operator =" whose parameter
     has a parameter of type "const X&".  */
Index: method.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v
retrieving revision 1.301
diff -c -5 -p -r1.301 method.c
*** method.c	20 Jul 2004 02:46:38 -0000	1.301
--- method.c	20 Jul 2004 04:51:56 -0000
*************** lazily_declare_fn (special_function_kind
*** 1066,1075 ****
--- 1066,1077 ----
        else
  	CLASSTYPE_LAZY_COPY_CTOR (type) = 0;
        /* Create appropriate clones.  */
        clone_function_decl (fn, /*update_method_vec=*/true);
      }
+   else if (sfk == sfk_assignment_operator)
+     CLASSTYPE_LAZY_ASSIGNMENT_OP (type) = 0;
  
    return fn;
  }
  
  /* Given a FUNCTION_DECL FN and a chain LIST, skip as many elements of LIST
Index: search.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/search.c,v
retrieving revision 1.303
diff -c -5 -p -r1.303 search.c
*** search.c	19 Jul 2004 15:45:53 -0000	1.303
--- search.c	20 Jul 2004 04:51:56 -0000
*************** lookup_fnfields_1 (tree type, tree name)
*** 1377,1388 ****
  	    lazily_declare_fn (sfk_constructor, type);
  	  if (CLASSTYPE_LAZY_COPY_CTOR (type))
  	    lazily_declare_fn (sfk_copy_constructor, type);
  	}
        else if (name == ansi_assopname(NOP_EXPR)
! 	       && !TYPE_HAS_ASSIGN_REF (type)
! 	       && !TYPE_FOR_JAVA (type))
  	lazily_declare_fn (sfk_assignment_operator, type);
      }
  
    method_vec = CLASSTYPE_METHOD_VEC (type);
    if (!method_vec)
--- 1377,1387 ----
  	    lazily_declare_fn (sfk_constructor, type);
  	  if (CLASSTYPE_LAZY_COPY_CTOR (type))
  	    lazily_declare_fn (sfk_copy_constructor, type);
  	}
        else if (name == ansi_assopname(NOP_EXPR)
! 	       && CLASSTYPE_LAZY_ASSIGNMENT_OP (type))
  	lazily_declare_fn (sfk_assignment_operator, type);
      }
  
    method_vec = CLASSTYPE_METHOD_VEC (type);
    if (!method_vec)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]