diff options
author | kan <kan@FreeBSD.org> | 2007-08-14 03:02:26 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-08-14 03:02:26 +0000 |
commit | 3cae63863eacd38993fa9e33009b556f3c3877bd (patch) | |
tree | a9733afd26cff18bf06842ab6f501c6872411dc3 /contrib | |
parent | 1f6ddc8fc4a726d61434af5aee6206e0d4670952 (diff) | |
download | FreeBSD-src-3cae63863eacd38993fa9e33009b556f3c3877bd.zip FreeBSD-src-3cae63863eacd38993fa9e33009b556f3c3877bd.tar.gz |
Merge files that are no longer carry FreeBSD local changes.
Approved by: re (kensmith)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/Makefile.in | 2 | ||||
-rw-r--r-- | contrib/gcc/config/i386/i386.md | 18 | ||||
-rw-r--r-- | contrib/gcc/cp/decl.c | 86 | ||||
-rw-r--r-- | contrib/gcc/reload.c | 5 |
4 files changed, 84 insertions, 27 deletions
diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in index 8c02cce..e48d863 100644 --- a/contrib/gcc/Makefile.in +++ b/contrib/gcc/Makefile.in @@ -1839,7 +1839,7 @@ stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ diff --git a/contrib/gcc/config/i386/i386.md b/contrib/gcc/config/i386/i386.md index d24b32a..f7481ed 100644 --- a/contrib/gcc/config/i386/i386.md +++ b/contrib/gcc/config/i386/i386.md @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) @@ -9326,7 +9326,7 @@ (define_insn "*negti2_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=ro") - (neg:TI (match_operand:TI 1 "general_operand" "0"))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_unary_operator_ok (NEG, TImode, operands)" @@ -9334,7 +9334,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") - (neg:TI (match_operand:TI 1 "general_operand" ""))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c index c3d71bc..28e653b 100644 --- a/contrib/gcc/cp/decl.c +++ b/contrib/gcc/cp/decl.c @@ -1573,6 +1573,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl); DECL_PURE_VIRTUAL_P (newdecl) |= DECL_PURE_VIRTUAL_P (olddecl); DECL_VIRTUAL_P (newdecl) |= DECL_VIRTUAL_P (olddecl); + DECL_INVALID_OVERRIDER_P (newdecl) |= DECL_INVALID_OVERRIDER_P (olddecl); DECL_THIS_STATIC (newdecl) |= DECL_THIS_STATIC (olddecl); if (DECL_OVERLOADED_OPERATOR_P (olddecl) != ERROR_MARK) SET_OVERLOADED_OPERATOR_CODE @@ -2161,8 +2162,24 @@ redeclaration_error_message (tree newdecl, tree olddecl) } else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl)) { - /* Objects declared at top level: */ - /* If at least one is a reference, it's ok. */ + /* The objects have been declared at namespace scope. If either + is a member of an anonymous union, then this is an invalid + redeclaration. For example: + + int i; + union { int i; }; + + is invalid. */ + if (DECL_ANON_UNION_VAR_P (newdecl) + || DECL_ANON_UNION_VAR_P (olddecl)) + return "redeclaration of %q#D"; + /* If at least one declaration is a reference, there is no + conflict. For example: + + int i = 3; + extern int i; + + is valid. */ if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl)) return NULL; /* Reject two definitions. */ @@ -5076,6 +5093,36 @@ initialize_artificial_var (tree decl, tree init) make_rtl_for_nonlocal_decl (decl, init, /*asmspec=*/NULL); } +/* INIT is the initializer for a variable, as represented by the + parser. Returns true iff INIT is value-dependent. */ + +static bool +value_dependent_init_p (tree init) +{ + if (TREE_CODE (init) == TREE_LIST) + /* A parenthesized initializer, e.g.: int i (3, 2); ? */ + return any_value_dependent_elements_p (init); + else if (TREE_CODE (init) == CONSTRUCTOR) + /* A brace-enclosed initializer, e.g.: int i = { 3 }; ? */ + { + VEC(constructor_elt, gc) *elts; + size_t nelts; + size_t i; + + elts = CONSTRUCTOR_ELTS (init); + nelts = VEC_length (constructor_elt, elts); + for (i = 0; i < nelts; ++i) + if (value_dependent_init_p (VEC_index (constructor_elt, + elts, i)->value)) + return true; + } + else + /* It must be a simple expression, e.g., int i = 3; */ + return value_dependent_expression_p (init); + + return false; +} + /* Finish processing of a declaration; install its line number and initial value. If the length of an array type is not known before, @@ -5148,18 +5195,16 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, TREE_CONSTANT (decl) = 1; } - if (!init - || !DECL_CLASS_SCOPE_P (decl) - || !DECL_INTEGRAL_CONSTANT_VAR_P (decl) - || type_dependent_p - || value_dependent_expression_p (init) - /* Check also if initializer is a value dependent - { integral_constant_expression }. */ - || (TREE_CODE (init) == CONSTRUCTOR - && VEC_length (constructor_elt, CONSTRUCTOR_ELTS (init)) == 1 - && value_dependent_expression_p - (VEC_index (constructor_elt, - CONSTRUCTOR_ELTS (init), 0)->value))) + /* Generally, initializers in templates are expanded when the + template is instantiated. But, if DECL is an integral + constant static data member, then it can be used in future + integral constant expressions, and its value must be + available. */ + if (!(init + && DECL_CLASS_SCOPE_P (decl) + && DECL_INTEGRAL_CONSTANT_VAR_P (decl) + && !type_dependent_p + && !value_dependent_init_p (init))) { if (init) DECL_INITIAL (decl) = init; @@ -5368,7 +5413,18 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, initializer. It is not legal to redeclare a static data member, so this issue does not arise in that case. */ if (var_definition_p && TREE_STATIC (decl)) - expand_static_init (decl, init); + { + /* If a TREE_READONLY variable needs initialization + at runtime, it is no longer readonly and we need to + avoid MEM_READONLY_P being set on RTL created for it. */ + if (init) + { + if (TREE_READONLY (decl)) + TREE_READONLY (decl) = 0; + was_readonly = 0; + } + expand_static_init (decl, init); + } } } diff --git a/contrib/gcc/reload.c b/contrib/gcc/reload.c index 08a393f..262e80e 100644 --- a/contrib/gcc/reload.c +++ b/contrib/gcc/reload.c @@ -1180,7 +1180,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, /* If IN appears in OUT, we can't share any input-only reload for IN. */ if (in != 0 && out != 0 && MEM_P (out) - && (REG_P (in) || MEM_P (in)) + && (REG_P (in) || MEM_P (in) || GET_CODE (in) == PLUS) && reg_overlap_mentioned_for_reload_p (in, XEXP (out, 0))) dont_share = 1; @@ -6540,7 +6540,8 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in) if (REG_P (in)) return 0; else if (GET_CODE (in) == PLUS) - return (reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0)) + return (rtx_equal_p (x, in) + || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0)) || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1))); else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in) || reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in)); |