diff options
author | Jason Merrill <jason@redhat.com> | 2003-10-09 01:44:57 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-10-09 01:44:57 -0400 |
commit | 1456deafd7978b7201704ac822231c9ac4f260fe (patch) | |
tree | 4afd5b15eb7fe41b0e949cd004d55cb26834adbf | |
parent | 08cffcce0f0569711be8949bbaf579a54264b9ce (diff) | |
download | gcc-1456deafd7978b7201704ac822231c9ac4f260fe.zip gcc-1456deafd7978b7201704ac822231c9ac4f260fe.tar.gz gcc-1456deafd7978b7201704ac822231c9ac4f260fe.tar.bz2 |
stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here.
* stmt.c (resolve_asm_operand_names): Call check_unique_operand_names
here.
(expand_asm_operands): Not here.
(parse_input_constraint): No longer static.
* tree.h: Declare it.
* coverage.c (build_ctr_info_value): Use build_decl to make a
VAR_DECL.
(create_coverage): Likewise.
java/
* parse.y (patch_assignment): Use make_node to create a BLOCK.
* parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
POINTER_TYPE.
cp/
* tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
(build_target_expr_with_type): Likewise.
* pt.c (instantiate_class_template): Sanity check that our
enclosing class has been instantiated.
From-SVN: r72255
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/coverage.c | 5 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/pt.c | 13 | ||||
-rw-r--r-- | gcc/cp/tree.c | 4 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/parse.h | 2 | ||||
-rw-r--r-- | gcc/java/parse.y | 3 | ||||
-rw-r--r-- | gcc/stmt.c | 9 | ||||
-rw-r--r-- | gcc/tree.h | 2 |
10 files changed, 50 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4e78fc..3216569 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2003-10-09 Jason Merrill <jason@redhat.com> + + * coverage.c (build_ctr_info_value): Use build_decl to make a + VAR_DECL. + (create_coverage): Likewise. + + * stmt.c (resolve_asm_operand_names): Call check_unique_operand_names + here. + (expand_asm_operands): Not here. + (parse_input_constraint): No longer static. + * tree.h: Declare it. + 2003-10-08 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/t-linux (SHLIB_LINK): Override to use a linker script diff --git a/gcc/coverage.c b/gcc/coverage.c index e6f4129..b02c97c 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -637,7 +637,7 @@ build_ctr_info_value (unsigned int counter, tree type) array_type = build_array_type (TREE_TYPE (TREE_TYPE (fields)), array_type); - array = build (VAR_DECL, array_type, NULL_TREE, NULL_TREE); + array = build_decl (VAR_DECL, NULL_TREE, array_type); TREE_STATIC (array) = 1; DECL_NAME (array) = get_identifier (XSTR (ctr_labels[counter], 0)); assemble_variable (array, 0, 0, 0); @@ -824,8 +824,7 @@ create_coverage (void) gcov_info_value = build_gcov_info (); - gcov_info = build (VAR_DECL, TREE_TYPE (gcov_info_value), - NULL_TREE, NULL_TREE); + gcov_info = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (gcov_info_value)); DECL_INITIAL (gcov_info) = gcov_info_value; TREE_STATIC (gcov_info) = 1; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e595526..b7cf029 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2003-10-09 Jason Merrill <jason@redhat.com> + + * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. + (build_target_expr_with_type): Likewise. + + * pt.c (instantiate_class_template): Sanity check that our + enclosing class has been instantiated. + 2003-10-08 Giovanni Bajo <giovannibajo@libero.it> * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f0dc0e1..909eede 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5182,7 +5182,18 @@ instantiate_class_template (tree type) SET_ANON_AGGR_TYPE_P (type); pbinfo = TYPE_BINFO (pattern); - + +#ifdef ENABLE_CHECKING + if (DECL_CLASS_SCOPE_P (TYPE_MAIN_DECL (pattern)) + && ! COMPLETE_TYPE_P (TYPE_CONTEXT (type)) + && ! TYPE_BEING_DEFINED (TYPE_CONTEXT (type))) + /* We should never instantiate a nested class before its enclosing + class; we need to look up the nested class by name before we can + instantiate it, and that lookup should instantiate the enclosing + class. */ + abort (); +#endif + if (BINFO_BASETYPES (pbinfo)) { tree base_list = NULL_TREE; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 0c729d6..109f7e5 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -269,7 +269,7 @@ build_cplus_new (tree type, tree init) && TREE_CODE (TREE_OPERAND (fn, 0)) == FUNCTION_DECL && DECL_CONSTRUCTOR_P (TREE_OPERAND (fn, 0))); - slot = build (VAR_DECL, type); + slot = build_decl (VAR_DECL, NULL_TREE, type); DECL_ARTIFICIAL (slot) = 1; DECL_CONTEXT (slot) = current_function_decl; layout_decl (slot, 0); @@ -311,7 +311,7 @@ build_target_expr_with_type (tree init, tree type) if (TREE_CODE (init) == TARGET_EXPR) return init; - slot = build (VAR_DECL, type); + slot = build_decl (VAR_DECL, NULL_TREE, type); DECL_ARTIFICIAL (slot) = 1; DECL_CONTEXT (slot) = current_function_decl; layout_decl (slot, 0); diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 25e70c2..d2b6d26 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2003-10-09 Jason Merrill <jason@redhat.com> + + * parse.y (patch_assignment): Use make_node to create a BLOCK. + * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a + POINTER_TYPE. + 2003-10-06 Mark Mitchell <mark@codesourcery.com> * Make-lang.in (java.info): Replace with ... diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 0234108..70d2b18 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -154,7 +154,7 @@ extern tree stabilize_reference (tree); /* Quickly build a temporary pointer on hypothetical type NAME. */ #define BUILD_PTR_FROM_NAME(ptr, name) \ do { \ - ptr = build (POINTER_TYPE, NULL_TREE); \ + ptr = make_node (POINTER_TYPE); \ TYPE_NAME (ptr) = name; \ } while (0) diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 541e2b2..144ac7e 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -12913,10 +12913,11 @@ patch_assignment (tree node, tree wfl_op1) { tree tmp = build_decl (VAR_DECL, get_identifier ("<tmp>"), TREE_TYPE (new_rhs)); - tree block = build (BLOCK, TREE_TYPE (new_rhs), NULL); + tree block = make_node (BLOCK); tree assignment = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); DECL_CONTEXT (tmp) = current_function_decl; + TREE_TYPE (block) = TREE_TYPE (new_rhs); BLOCK_VARS (block) = tmp; BLOCK_EXPR_BODY (block) = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); @@ -391,8 +391,6 @@ struct stmt_status GTY(()) static int using_eh_for_cleanups_p = 0; static int n_occurrences (int, const char *); -static bool parse_input_constraint (const char **, int, int, int, int, - const char * const *, bool *, bool *); static bool decl_conflicts_with_clobbers_p (tree, const HARD_REG_SET); static void expand_goto_internal (tree, rtx, rtx); static int expand_fixup (tree, rtx, rtx); @@ -1253,7 +1251,7 @@ parse_output_constraint (const char **constraint_p, int operand_num, /* Similar, but for input constraints. */ -static bool +bool parse_input_constraint (const char **constraint_p, int input_num, int ninputs, int noutputs, int ninout, const char * const * constraints, @@ -1465,9 +1463,6 @@ expand_asm_operands (tree string, tree outputs, tree inputs, if (! check_operand_nalternatives (outputs, inputs)) return; - if (! check_unique_operand_names (outputs, inputs)) - return; - string = resolve_asm_operand_names (string, outputs, inputs); /* Collect constraints. */ @@ -1975,6 +1970,8 @@ resolve_asm_operand_names (tree string, tree outputs, tree inputs) const char *c; tree t; + check_unique_operand_names (outputs, inputs); + /* Substitute [<name>] in input constraint strings. There should be no named operands in output constraints. */ for (t = inputs; t ; t = TREE_CHAIN (t)) @@ -2977,6 +2977,8 @@ extern void emit_nop (void); extern void expand_computed_goto (tree); extern bool parse_output_constraint (const char **, int, int, int, bool *, bool *, bool *); +extern bool parse_input_constraint (const char **, int, int, int, int, + const char * const *, bool *, bool *); extern void expand_asm_operands (tree, tree, tree, tree, int, location_t); extern tree resolve_asm_operand_names (tree, tree, tree); extern int any_pending_cleanups (void); |