Commit 1456deaf by Jason Merrill Committed by Jason Merrill

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
parent 08cffcce
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
......
......@@ -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;
......
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.
......
......@@ -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;
......
......@@ -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);
......
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 ...
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment