From 1eefe28060f6a5b3a78cdfe24ccd543d8e94f70a Mon Sep 17 00:00:00 2001 From: kazu Date: Sat, 11 May 2002 10:47:05 +0000 Subject: [PATCH] * dbxout.c: Fix formatting. * dependence.c: Likewise. * df.c: Likewise. * diagnostic.c: Likewise. * doloop.c: Likewise. * dominance.c: Likewise. * doschk.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53380 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 13 ++ gcc/dbxout.c | 40 +++--- gcc/dependence.c | 42 +++--- gcc/df.c | 114 ++++++++-------- gcc/diagnostic.c | 340 ++++++++++++++++++++++++----------------------- gcc/doloop.c | 4 +- gcc/dominance.c | 28 ++-- gcc/doschk.c | 6 +- gcc/dwarf2asm.c | 8 +- gcc/dwarf2out.c | 20 +-- gcc/dwarfout.c | 142 ++++++++++---------- 11 files changed, 388 insertions(+), 369 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 993063461cc5..272472033ad0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2002-05-11 Kazu Hirata + + * dbxout.c: Fix formatting. + * dependence.c: Likewise. + * df.c: Likewise. + * diagnostic.c: Likewise. + * doloop.c: Likewise. + * dominance.c: Likewise. + * doschk.c: Likewise. + * dwarf2asm.c: Likewise. + * dwarf2out.c: Likewise. + * dwarfout.c: Likewise. + 2002-05-10 Richard Henderson * final.c (end_final): Tidy whitespace. Don't honor flag_pack_struct. diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 383f469f253b..fc49ad70a5a6 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -669,7 +669,7 @@ dbxout_global_decl (decl) && ! DECL_EXTERNAL (decl) && DECL_RTL_SET_P (decl)) /* Not necessary? */ dbxout_symbol (decl, 0); -} +} /* At the end of compilation, finish writing the symbol table. Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is @@ -959,7 +959,7 @@ dbxout_type_methods (type) } if (!need_prefix) { - putc (';', asmfile); + putc (';', asmfile); CHARS (1); } } @@ -1219,7 +1219,7 @@ dbxout_type (type, full) write it as a subtype. */ else if (TREE_TYPE (type) != 0 && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE) - { + { /* If the size is non-standard, say what it is if we can use GDB extensions. */ @@ -1232,10 +1232,10 @@ dbxout_type (type, full) } dbxout_range_type (type); - } + } else - { + { /* If the size is non-standard, say what it is if we can use GDB extensions. */ @@ -1259,7 +1259,7 @@ dbxout_type (type, full) larger. This is because we print the bounds as signed decimal, and hence they can't span same size unsigned types. */ - if (use_gnu_debug_info_extensions + if (use_gnu_debug_info_extensions && TYPE_MIN_VALUE (type) != 0 && TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST && TYPE_MAX_VALUE (type) != 0 @@ -1288,7 +1288,7 @@ dbxout_type (type, full) else /* Output other integer types as subranges of `int'. */ dbxout_range_type (type); - } + } break; @@ -1801,7 +1801,7 @@ print_wide_int (c) CHARS (digs); } - + /* Output the name of type TYPE, with no punctuation. Such names can be set up either by typedef declarations or by struct, enum and union tags. */ @@ -1947,7 +1947,7 @@ dbxout_symbol (decl, local) && !TREE_ASM_WRITTEN (TYPE_NAME (type)) /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ - && DECL_ARTIFICIAL (decl) + && DECL_ARTIFICIAL (decl) /* Do not generate a tag for records of variable size, since this type can not be properly described in the DBX format, and it confuses some tools such as objdump. */ @@ -1979,7 +1979,7 @@ dbxout_symbol (decl, local) && TYPE_NAME (type) == decl /* Distinguish the implicit typedefs of C++ from explicit ones that might be found in C. */ - && DECL_ARTIFICIAL (decl)) + && DECL_ARTIFICIAL (decl)) { if (use_gnu_debug_info_extensions && have_used_extensions) { @@ -2112,7 +2112,7 @@ dbxout_symbol (decl, local) result = dbxout_symbol_location (decl, type, 0, DECL_RTL (decl)); break; - + default: break; } @@ -2136,7 +2136,7 @@ dbxout_symbol_location (decl, type, suffix, home) /* Don't mention a variable at all if it was completely optimized into nothingness. - + If the decl was from an inline function, then its rtl is not identically the rtl that was used in this particular compilation. */ @@ -2215,7 +2215,7 @@ dbxout_symbol_location (decl, type, suffix, home) || GET_CODE (tmp) == LABEL_REF) current_sym_addr = tmp; } - + /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION data_section (); @@ -2504,7 +2504,7 @@ dbxout_parms (parms) } /* It is quite tempting to use: - + dbxout_type (TREE_TYPE (parms), 0); as the next statement, rather than using DECL_ARG_TYPE(), so @@ -2517,7 +2517,7 @@ dbxout_parms (parms) double on the stack, but if we emit a stab saying the type is a float, then gdb will only read in a single value, and this will produce an erroneous value. */ - dbxout_type (DECL_ARG_TYPE (parms), 0); + dbxout_type (DECL_ARG_TYPE (parms), 0); current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); dbxout_finish_symbol (parms); } @@ -2635,13 +2635,13 @@ dbxout_parms (parms) const char *const decl_name = (DECL_NAME (parms) ? IDENTIFIER_POINTER (DECL_NAME (parms)) : "(anon)"); - if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) - current_sym_value = 0; + if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) + current_sym_value = 0; else current_sym_value = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); current_sym_addr = 0; - + FORCE_TEXT; fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name); @@ -2679,7 +2679,7 @@ dbxout_parms (parms) && TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms)) && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD) { - current_sym_value += + current_sym_value += GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))) - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))); } @@ -2789,7 +2789,7 @@ dbxout_block (block, depth, args) int blocknum = -1; #if DBX_BLOCKS_FUNCTION_RELATIVE - const char *begin_label; + const char *begin_label; if (current_function_func_begin_label != NULL_TREE) begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); else diff --git a/gcc/dependence.c b/gcc/dependence.c index 1a5564dda9ab..d4bb2eac4fa9 100644 --- a/gcc/dependence.c +++ b/gcc/dependence.c @@ -149,7 +149,7 @@ typedef struct dependence int distance[MAX_SUBSCRIPTS]; struct dependence *next; } dependence; - + /* subscripts are represented by an array of these. Each reflects one X * i + Y term, where X and Y are constants. */ @@ -255,7 +255,7 @@ init_dependence_analysis (exp) } /* Build ARRAY_REF def/use info 'def_use_chain' starting at EXP which is a def - or use DU_TYPE */ + or use DU_TYPE */ static void build_def_use (exp, du_type) @@ -277,7 +277,7 @@ build_def_use (exp, du_type) nloop = 0; du_idx = 0; } - + while (node) switch (TREE_CODE (node)) { @@ -301,7 +301,7 @@ build_def_use (exp, du_type) TREE_OPERAND (node, 2), loop_def) == 0) loop_def->status = unnormal; - + build_def_use (TREE_OPERAND (node, 3), 0); nloop--; current_loop = 0; @@ -309,7 +309,7 @@ build_def_use (exp, du_type) break; case MODIFY_EXPR: /* Is an induction variable modified? */ - if (loop_def + if (loop_def && TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL && have_induction_variable (loop_def->outer_loop, @@ -362,7 +362,7 @@ build_def_use (exp, du_type) break; } } - + for (i = 0; i < du_idx && strcmp (IDENTIFIER_POINTER (DECL_NAME (array_ref)), @@ -388,7 +388,7 @@ build_def_use (exp, du_type) case DECL_STMT: node = TREE_CHAIN (node); break; - + case EXPR_STMT: if (TREE_CODE (TREE_OPERAND (node, 0)) == MODIFY_EXPR) build_def_use (TREE_OPERAND (node, 0), def); @@ -514,7 +514,7 @@ find_induction_variable (init_node, cond_node, incr_node, loop_def) ind_ptr->low_bound = get_low_bound (init_node, ind_ptr->variable); if (TREE_CODE (TREE_OPERAND (cond_node, 0)) == VAR_DECL - && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 0))) + && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 0))) == ind_ptr->variable) { if (TREE_CODE (TREE_OPERAND (cond_node, 1)) == INTEGER_CST) @@ -732,7 +732,7 @@ check_node_dependence (du) ck_loop_ptr, j); /* ?? Add other tests: single variable exact test, banerjee */ } - + ck_loop_ptr = ck_loop_ptr->next_nest; } @@ -752,8 +752,8 @@ check_node_dependence (du) dep_ptr->source = use_ptr->expression; dep_ptr->destination = def_ptr->expression; dep_ptr->next = 0; - - if (def_ptr < use_ptr && use_ptr->type == use) + + if (def_ptr < use_ptr && use_ptr->type == use) dep_ptr->dependence = dt_flow; else if (def_ptr > use_ptr && use_ptr->type == use) dep_ptr->dependence = dt_anti; @@ -832,7 +832,7 @@ get_coefficients (du, coefficients) coefficients[i].variable = 0; coefficients[i].next = 0; } - + for (array_ref = du->expression; TREE_CODE (array_ref) == ARRAY_REF; array_ref = TREE_OPERAND (array_ref, 0)) @@ -951,7 +951,7 @@ normalize_coefficients (coefficients, loop_ptr, count) for (i = 1; i <= count; i++) { - for (ck_loop_ptr = loop_ptr; ck_loop_ptr; + for (ck_loop_ptr = loop_ptr; ck_loop_ptr; ck_loop_ptr = ck_loop_ptr->next_nest) for (ind_ptr = ck_loop_ptr->ind; ind_ptr; ind_ptr = ind_ptr->next) { @@ -1014,7 +1014,7 @@ classify_dependence (icoefficients, ocoefficients, complexity, separability, } } } - + for (idx = 1; idx <= count; idx++) { if (iiv_used[idx] == 0 && oiv_used[idx] == 0) @@ -1178,7 +1178,7 @@ gcd_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub) } /* ?? gcd does not yield direction and distance. Wolfe's direction vector hierarchy can be used to give this. */ -} +} /* Find the gcd of X and Y using Euclid's algorithm */ @@ -1213,7 +1213,7 @@ find_gcd (x, y) } /* Merge SUBSCRIPT_COUNT DIRECTIONs and DISTANCEs for LOOP_COUNT loops. - We use a predefined array to handle the direction merge. + We use a predefined array to handle the direction merge. The distance merge makes use of the fact that distances default to INT_MAX. Distances are '&' together. Watch out for a negative distance. */ @@ -1228,7 +1228,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count) int i, j; int sign; - static const enum direction_type direction_merge [8][8] = + static const enum direction_type direction_merge [8][8] = {{lt, le, le, star, star, lt, independent, lt}, {le, le, le, star, star, le, independent, le}, {le, le, eq, ge, ge, eq, independent, eq}, @@ -1238,7 +1238,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count) {independent, independent, independent, independent, independent}, {independent, independent, independent} }; - + for (i = 1; i <= loop_count; i++) { distance[i][0] = INT_MAX; @@ -1314,7 +1314,7 @@ dump_one_node (du, seen) for (array_ref = du_ptr->expression; TREE_CODE (array_ref) == ARRAY_REF; array_ref = TREE_OPERAND (array_ref, 0)) - { + { printf ("["); dump_array_ref (TREE_OPERAND (array_ref, 1)); printf ("]"); @@ -1395,7 +1395,7 @@ search_dependence (node) return dep_idx + 1; } } - + return 0; } @@ -1418,7 +1418,7 @@ remember_dest_for_dependence (node) #define MEM_DEPENDENCY(RTX) XCWINT (RTX, 2, MEM) #endif -/* Return 1 along with the dependence DIRECTION and DISTANCE if there is a +/* Return 1 along with the dependence DIRECTION and DISTANCE if there is a dependence from dest_rtx to src_rtx. */ int diff --git a/gcc/df.c b/gcc/df.c index ed0fd77029be..be36febfea95 100644 --- a/gcc/df.c +++ b/gcc/df.c @@ -153,7 +153,7 @@ when optimising a loop, only certain registers are of interest. Perhaps there should be a bitmap argument to df_analyse to specify which registers should be analysed? */ -#define HANDLE_SUBREG +#define HANDLE_SUBREG #include "config.h" #include "system.h" @@ -295,16 +295,16 @@ static void df_chain_dump PARAMS((struct df_link *, FILE *file)); static void df_chain_dump_regno PARAMS((struct df_link *, FILE *file)); static void df_regno_debug PARAMS ((struct df *, unsigned int, FILE *)); static void df_ref_debug PARAMS ((struct df *, struct ref *, FILE *)); -static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap, +static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); -static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap, +static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); -static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap, +static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap, bitmap, bitmap, void *)); -static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *, - bitmap *, bitmap *, enum df_flow_dir, - enum df_confluence_op, - transfer_function_bitmap, +static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *, + bitmap *, bitmap *, enum df_flow_dir, + enum df_confluence_op, + transfer_function_bitmap, sbitmap, sbitmap, void *)); static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *, sbitmap *, sbitmap *, enum df_flow_dir, @@ -881,7 +881,7 @@ df_ref_record (df, reg, loc, insn, ref_type, ref_flags) XXX Is that true? We could also use the global word_mode variable. */ if (GET_CODE (reg) == SUBREG && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode) - || GET_MODE_SIZE (GET_MODE (reg)) + || GET_MODE_SIZE (GET_MODE (reg)) >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg))))) { loc = &SUBREG_REG (reg); @@ -956,7 +956,7 @@ df_def_record_1 (df, x, bb, insn) /* May be, we should flag the use of strict_low_part somehow. Might be handy for the reg allocator. */ while (GET_CODE (dst) == STRICT_LOW_PART - || GET_CODE (dst) == ZERO_EXTRACT + || GET_CODE (dst) == ZERO_EXTRACT || GET_CODE (dst) == SIGN_EXTRACT || read_modify_subreg_p (dst)) { @@ -971,9 +971,9 @@ df_def_record_1 (df, x, bb, insn) dst = *loc; flags |= DF_REF_READ_WRITE; } - + if (GET_CODE (dst) == REG - || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) + || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags); } @@ -1090,7 +1090,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags) case PC: break; case MEM: - df_uses_record (df, &XEXP (dst, 0), + df_uses_record (df, &XEXP (dst, 0), DF_REF_REG_MEM_STORE, bb, insn, 0); break; @@ -1135,7 +1135,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags) For now, just mark any regs we can find in ASM_OPERANDS as used. */ - /* For all ASM_OPERANDS, we must traverse the vector of input operands. + /* For all ASM_OPERANDS, we must traverse the vector of input operands. We can not just fall through here since then we would be confused by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate traditional asms unlike their normal usage. */ @@ -1253,7 +1253,7 @@ df_insn_refs_record (df, bb, insn) { x = df_reg_use_gen (i); df_uses_record (df, &SET_DEST (x), - DF_REF_REG_USE, bb, insn, 0); + DF_REF_REG_USE, bb, insn, 0); } } } @@ -1673,7 +1673,7 @@ df_bb_rd_local_compute (df, bb) bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); } } - + bb_info->rd_valid = 1; } @@ -1703,7 +1703,7 @@ df_bb_ru_local_compute (df, bb) /* This is much more tricky than computing reaching defs. With reaching defs, defs get killed by other defs. With upwards exposed uses, these get killed by defs with the same regno. */ - + struct bb_info *bb_info = DF_BB_INFO (df, bb); rtx insn; @@ -2015,7 +2015,7 @@ df_analyse_1 (df, blocks, flags, update) df->inverse_dfs_map = xmalloc (sizeof(int) * n_basic_blocks); df->inverse_rc_map = xmalloc (sizeof(int) * n_basic_blocks); df->inverse_rts_map = xmalloc (sizeof(int) * n_basic_blocks); - + flow_depth_first_order_compute (df->dfs_order, df->rc_order); flow_reverse_top_sort_order_compute (df->rts_order); for (i = 0; i < n_basic_blocks; i ++) @@ -2041,7 +2041,7 @@ df_analyse_1 (df, blocks, flags, update) gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_gen; kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_kill; } - iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, + iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, FORWARD, UNION, df_rd_transfer_function, df->inverse_rc_map, NULL); free (in); @@ -2078,7 +2078,7 @@ df_analyse_1 (df, blocks, flags, update) gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_gen; kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_kill; } - iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, + iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, BACKWARD, UNION, df_ru_transfer_function, df->inverse_rts_map, NULL); free (in); @@ -2104,7 +2104,7 @@ df_analyse_1 (df, blocks, flags, update) if (aflags & DF_LR) { /* Compute the sets of defs and uses of live variables. */ - df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); + df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); { int i; bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks); @@ -2118,7 +2118,7 @@ df_analyse_1 (df, blocks, flags, update) use[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_use; def[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_def; } - iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, + iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, BACKWARD, UNION, df_lr_transfer_function, df->inverse_rts_map, NULL); free (in); @@ -3260,9 +3260,9 @@ df_chain_dump_regno (link, file) for (; link; link = link->next) { fprintf (file, "%c%d(%d) ", - DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', - DF_REF_ID (link->ref), - DF_REF_REGNO (link->ref)); + DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', + DF_REF_ID (link->ref), + DF_REF_REGNO (link->ref)); } fprintf (file, "}"); } @@ -3492,7 +3492,7 @@ df_insn_debug_regno (df, insn, file) bbi = -1; fprintf (file, "insn %d bb %d luid %d defs ", - uid, bbi, DF_INSN_LUID (df, insn)); + uid, bbi, DF_INSN_LUID (df, insn)); df_chain_dump_regno (df->insns[uid].defs, file); fprintf (file, " uses "); df_chain_dump_regno (df->insns[uid].uses, file); @@ -3595,9 +3595,9 @@ debug_df_chain (link) /* Hybrid search algorithm from "Implementation Techniques for Efficient Data-Flow Analysis of Large Programs". */ -static void -hybrid_search_bitmap (block, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, +static void +hybrid_search_bitmap (block, in, out, gen, kill, dir, + conf_op, transfun, visited, pending, data) basic_block block; bitmap *in, *out, *gen, *kill; @@ -3634,7 +3634,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, } } } - else + else { /* Calculate of successor ins */ bitmap_zero(out[i]); @@ -3643,7 +3643,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) - { + { case UNION: bitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; @@ -3652,7 +3652,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, break; } } - } + } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); @@ -3685,8 +3685,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) - hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, + hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, + conf_op, transfun, visited, pending, data); } } @@ -3697,8 +3697,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) - hybrid_search_bitmap (e->src, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, + hybrid_search_bitmap (e->src, in, out, gen, kill, dir, + conf_op, transfun, visited, pending, data); } } @@ -3706,8 +3706,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, /* Hybrid search for sbitmaps, rather than bitmaps. */ -static void -hybrid_search_sbitmap (block, in, out, gen, kill, dir, +static void +hybrid_search_sbitmap (block, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data) basic_block block; @@ -3745,7 +3745,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, } } } - else + else { /* Calculate of successor ins */ sbitmap_zero(out[i]); @@ -3754,7 +3754,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, if (e->dest == EXIT_BLOCK_PTR) continue; switch (conf_op) - { + { case UNION: sbitmap_a_or_b (out[i], out[i], in[e->dest->index]); break; @@ -3763,7 +3763,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, break; } } - } + } /* Common part */ (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); RESET_BIT (pending, i); @@ -3796,8 +3796,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) continue; if (!TEST_BIT (visited, e->dest->index)) - hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, + hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, + conf_op, transfun, visited, pending, data); } } @@ -3808,8 +3808,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) continue; if (!TEST_BIT (visited, e->src->index)) - hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, + hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, + conf_op, transfun, visited, pending, data); } } @@ -3827,20 +3827,20 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, transfun = Transfer function. order = Order to iterate in. (Should map block numbers -> order) data = Whatever you want. It's passed to the transfer function. - + This function will perform iterative bitvector dataflow, producing the in and out sets. Even if you only want to perform it for a small number of blocks, the vectors for in and out must be large enough for *all* blocks, because changing one block might affect others. However, it'll only put what you say to analyze on the initial worklist. - + For forward problems, you probably want to pass in a mapping of block number to rc_order (like df->inverse_rc_map). */ void -iterative_dataflow_sbitmap (in, out, gen, kill, blocks, - dir, conf_op, transfun, order, data) +iterative_dataflow_sbitmap (in, out, gen, kill, blocks, + dir, conf_op, transfun, order, data) sbitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; @@ -3860,7 +3860,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, worklist = fibheap_new (); EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, { - fibheap_insert (worklist, order[i], (void *) (size_t) i); + fibheap_insert (worklist, order[i], (void *) (size_t) i); SET_BIT (pending, i); if (dir == FORWARD) sbitmap_copy (out[i], gen[i]); @@ -3874,7 +3874,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) - hybrid_search_sbitmap (bb, in, out, gen, kill, dir, + hybrid_search_sbitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) @@ -3888,7 +3888,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, else { break; - } + } } sbitmap_free (pending); sbitmap_free (visited); @@ -3898,8 +3898,8 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, /* Exactly the same as iterative_dataflow_sbitmap, except it works on bitmaps instead */ void -iterative_dataflow_bitmap (in, out, gen, kill, blocks, - dir, conf_op, transfun, order, data) +iterative_dataflow_bitmap (in, out, gen, kill, blocks, + dir, conf_op, transfun, order, data) bitmap *in, *out, *gen, *kill; bitmap blocks; enum df_flow_dir dir; @@ -3933,7 +3933,7 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks, i = (size_t) fibheap_extract_min (worklist); bb = BASIC_BLOCK (i); if (!TEST_BIT (visited, bb->index)) - hybrid_search_bitmap (bb, in, out, gen, kill, dir, + hybrid_search_bitmap (bb, in, out, gen, kill, dir, conf_op, transfun, visited, pending, data); } if (sbitmap_first_set_bit (pending) != -1) @@ -3947,9 +3947,9 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks, else { break; - } + } } sbitmap_free (pending); sbitmap_free (visited); - fibheap_delete (worklist); + fibheap_delete (worklist); } diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 3e45e36aacd7..b4f0fade0f7f 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -40,11 +40,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ - do { \ - sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \ - output_add_string (BUFFER, (BUFFER)->digit_buffer); \ - } while (0) +#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ + do \ + { \ + sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \ + output_add_string (BUFFER, (BUFFER)->digit_buffer); \ + } \ + while (0) #define output_text_length(BUFFER) (BUFFER)->line_length #define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0) @@ -59,7 +61,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Prototypes. */ static void diagnostic_finish PARAMS ((output_buffer *)); static void output_do_verbatim PARAMS ((output_buffer *, - const char *, va_list *)); + const char *, va_list *)); static void output_buffer_to_stream PARAMS ((output_buffer *)); static void output_format PARAMS ((output_buffer *)); static void output_indent PARAMS ((output_buffer *)); @@ -77,22 +79,22 @@ static void set_real_maximum_length PARAMS ((output_buffer *)); static void output_unsigned_decimal PARAMS ((output_buffer *, unsigned int)); static void output_long_decimal PARAMS ((output_buffer *, long int)); static void output_long_unsigned_decimal PARAMS ((output_buffer *, - long unsigned int)); + long unsigned int)); static void output_octal PARAMS ((output_buffer *, unsigned int)); static void output_long_octal PARAMS ((output_buffer *, unsigned long int)); static void output_hexadecimal PARAMS ((output_buffer *, unsigned int)); static void output_long_hexadecimal PARAMS ((output_buffer *, - unsigned long int)); + unsigned long int)); static void output_append_r PARAMS ((output_buffer *, const char *, int)); static void wrap_text PARAMS ((output_buffer *, const char *, const char *)); static void maybe_wrap_text PARAMS ((output_buffer *, const char *, - const char *)); + const char *)); static void clear_diagnostic_info PARAMS ((output_buffer *)); static void default_diagnostic_starter PARAMS ((output_buffer *, - diagnostic_context *)); + diagnostic_context *)); static void default_diagnostic_finalizer PARAMS ((output_buffer *, - diagnostic_context *)); + diagnostic_context *)); static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN; @@ -203,13 +205,13 @@ set_real_maximum_length (buffer) else { int prefix_length = - output_prefix (buffer) ? strlen (output_prefix (buffer)) : 0; + output_prefix (buffer) ? strlen (output_prefix (buffer)) : 0; /* If the prefix is ridiculously too long, output at least 32 characters. */ if (output_line_cutoff (buffer) - prefix_length < 32) - line_wrap_cutoff (buffer) = output_line_cutoff (buffer) + 32; + line_wrap_cutoff (buffer) = output_line_cutoff (buffer) + 32; else - line_wrap_cutoff (buffer) = output_line_cutoff (buffer); + line_wrap_cutoff (buffer) = output_line_cutoff (buffer); } } @@ -245,7 +247,7 @@ output_last_position (buffer) const output_buffer *buffer; { const char *p = NULL; - + if (obstack_base (&buffer->obstack) != obstack_next_free (&buffer->obstack)) p = ((const char *) obstack_next_free (&buffer->obstack)) - 1; return p; @@ -302,7 +304,7 @@ init_output_buffer (buffer, prefix, maximum_length) output_prefixing_rule (buffer) = diagnostic_prefixing_rule (global_dc); output_set_prefix (buffer, prefix); output_text_length (buffer) = 0; - clear_diagnostic_info (buffer); + clear_diagnostic_info (buffer); } /* Reinitialize BUFFER. */ @@ -352,28 +354,28 @@ output_emit_prefix (buffer) if (output_prefix (buffer) != NULL) { switch (output_prefixing_rule (buffer)) - { - default: - case DIAGNOSTICS_SHOW_PREFIX_NEVER: - break; - - case DIAGNOSTICS_SHOW_PREFIX_ONCE: - if (prefix_was_emitted_for (buffer)) - { - output_indent (buffer); - break; - } - output_indentation (buffer) += 3; - /* Fall through. */ - - case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: - { - int prefix_length = strlen (output_prefix (buffer)); - output_append_r (buffer, output_prefix (buffer), prefix_length); - prefix_was_emitted_for (buffer) = 1; - } - break; - } + { + default: + case DIAGNOSTICS_SHOW_PREFIX_NEVER: + break; + + case DIAGNOSTICS_SHOW_PREFIX_ONCE: + if (prefix_was_emitted_for (buffer)) + { + output_indent (buffer); + break; + } + output_indentation (buffer) += 3; + /* Fall through. */ + + case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: + { + int prefix_length = strlen (output_prefix (buffer)); + output_append_r (buffer, output_prefix (buffer), prefix_length); + prefix_was_emitted_for (buffer) = 1; + } + break; + } } } @@ -511,8 +513,8 @@ output_append (buffer, start, end) { output_emit_prefix (buffer); if (output_is_line_wrapping (buffer)) - while (start != end && *start == ' ') - ++start; + while (start != end && *start == ' ') + ++start; } output_append_r (buffer, start, end - start); } @@ -537,30 +539,30 @@ wrap_text (buffer, start, end) const char *end; { int is_wrapping = output_is_line_wrapping (buffer); - + while (start != end) { - /* Dump anything bordered by whitespaces. */ + /* Dump anything bordered by whitespaces. */ { - const char *p = start; - while (p != end && *p != ' ' && *p != '\n') - ++p; - if (is_wrapping && p - start >= output_space_left (buffer)) - output_add_newline (buffer); - output_append (buffer, start, p); - start = p; + const char *p = start; + while (p != end && *p != ' ' && *p != '\n') + ++p; + if (is_wrapping && p - start >= output_space_left (buffer)) + output_add_newline (buffer); + output_append (buffer, start, p); + start = p; } if (start != end && *start == ' ') - { - output_add_space (buffer); - ++start; - } + { + output_add_space (buffer); + ++start; + } if (start != end && *start == '\n') - { - output_add_newline (buffer); - ++start; - } + { + output_add_newline (buffer); + ++start; + } } } @@ -626,110 +628,110 @@ output_format (buffer) /* Ignore text. */ { - const char *p = output_buffer_text_cursor (buffer); - while (*p && *p != '%') - ++p; - wrap_text (buffer, output_buffer_text_cursor (buffer), p); - output_buffer_text_cursor (buffer) = p; + const char *p = output_buffer_text_cursor (buffer); + while (*p && *p != '%') + ++p; + wrap_text (buffer, output_buffer_text_cursor (buffer), p); + output_buffer_text_cursor (buffer) = p; } if (!*output_buffer_text_cursor (buffer)) - break; + break; /* We got a '%'. Let's see what happens. Record whether we're parsing a long integer format specifier. */ if (*++output_buffer_text_cursor (buffer) == 'l') - { - long_integer = 1; - ++output_buffer_text_cursor (buffer); - } + { + long_integer = 1; + ++output_buffer_text_cursor (buffer); + } /* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %o, %s, %u, %x, %.*s; %%. And nothing else. Front-ends should install printers to grok language specific format specifiers. */ switch (*output_buffer_text_cursor (buffer)) - { - case 'c': - output_add_character - (buffer, va_arg (output_buffer_format_args (buffer), int)); - break; - - case 'd': - case 'i': - if (long_integer) - output_long_decimal - (buffer, va_arg (output_buffer_format_args (buffer), long int)); - else - output_decimal - (buffer, va_arg (output_buffer_format_args (buffer), int)); - break; - - case 'o': - if (long_integer) - output_long_octal (buffer, - va_arg (output_buffer_format_args (buffer), - unsigned long int)); - else - output_octal (buffer, - va_arg (output_buffer_format_args (buffer), - unsigned int)); - break; - - case 's': - output_add_string (buffer, - va_arg (output_buffer_format_args (buffer), - const char *)); - break; - - case 'u': - if (long_integer) - output_long_unsigned_decimal - (buffer, va_arg (output_buffer_format_args (buffer), - long unsigned int)); - else - output_unsigned_decimal - (buffer, va_arg (output_buffer_format_args (buffer), - unsigned int)); - break; - - case 'x': - if (long_integer) - output_long_hexadecimal - (buffer, va_arg (output_buffer_format_args (buffer), - unsigned long int)); - else - output_hexadecimal - (buffer, va_arg (output_buffer_format_args (buffer), - unsigned int)); - break; - - case '%': - output_add_character (buffer, '%'); - break; - - case '.': - { - int n; - const char *s; - /* We handle no precision specifier but `%.*s'. */ - if (*++output_buffer_text_cursor (buffer) != '*') - abort (); - else if (*++output_buffer_text_cursor (buffer) != 's') - abort (); - n = va_arg (output_buffer_format_args (buffer), int); - s = va_arg (output_buffer_format_args (buffer), const char *); - output_append (buffer, s, s + n); - } - break; - - default: - if (!buffer->format_decoder || !(*buffer->format_decoder) (buffer)) - { - /* Hmmm. The front-end failed to install a format translator + { + case 'c': + output_add_character + (buffer, va_arg (output_buffer_format_args (buffer), int)); + break; + + case 'd': + case 'i': + if (long_integer) + output_long_decimal + (buffer, va_arg (output_buffer_format_args (buffer), long int)); + else + output_decimal + (buffer, va_arg (output_buffer_format_args (buffer), int)); + break; + + case 'o': + if (long_integer) + output_long_octal (buffer, + va_arg (output_buffer_format_args (buffer), + unsigned long int)); + else + output_octal (buffer, + va_arg (output_buffer_format_args (buffer), + unsigned int)); + break; + + case 's': + output_add_string (buffer, + va_arg (output_buffer_format_args (buffer), + const char *)); + break; + + case 'u': + if (long_integer) + output_long_unsigned_decimal + (buffer, va_arg (output_buffer_format_args (buffer), + long unsigned int)); + else + output_unsigned_decimal + (buffer, va_arg (output_buffer_format_args (buffer), + unsigned int)); + break; + + case 'x': + if (long_integer) + output_long_hexadecimal + (buffer, va_arg (output_buffer_format_args (buffer), + unsigned long int)); + else + output_hexadecimal + (buffer, va_arg (output_buffer_format_args (buffer), + unsigned int)); + break; + + case '%': + output_add_character (buffer, '%'); + break; + + case '.': + { + int n; + const char *s; + /* We handle no precision specifier but `%.*s'. */ + if (*++output_buffer_text_cursor (buffer) != '*') + abort (); + else if (*++output_buffer_text_cursor (buffer) != 's') + abort (); + n = va_arg (output_buffer_format_args (buffer), int); + s = va_arg (output_buffer_format_args (buffer), const char *); + output_append (buffer, s, s + n); + } + break; + + default: + if (!buffer->format_decoder || !(*buffer->format_decoder) (buffer)) + { + /* Hmmm. The front-end failed to install a format translator but called us with an unrecognized format. Sorry. */ - abort (); - } - } + abort (); + } + } } } @@ -804,7 +806,7 @@ output_do_printf (buffer, msg) const char *msg; { char *message = vbuild_message_string (msg, - output_buffer_format_args (buffer)); + output_buffer_format_args (buffer)); wrap_text (buffer, message, message + strlen (message)); free (message); @@ -837,7 +839,7 @@ format_with_decl (buffer, decl) tree decl; { const char *p; - + /* Do magic to get around lack of varargs support for insertion of arguments into existing list. We know that the decl is first; we ass_u_me that it will be printed with "%s". */ @@ -856,7 +858,7 @@ format_with_decl (buffer, decl) /* Print the left-hand substring. */ maybe_wrap_text (buffer, output_buffer_text_cursor (buffer), p); - + if (*p == '%') /* Print the name. */ { const char *const n = (DECL_NAME (decl) @@ -907,7 +909,7 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn) format_with_decl (diagnostic_buffer, decl); diagnostic_finish ((output_buffer *) global_dc); output_destroy_prefix (diagnostic_buffer); - + output_buffer_state (diagnostic_buffer) = os; } diagnostic_lock--; @@ -1068,7 +1070,7 @@ announce_function (decl) if (rtl_dump_and_exit) verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl))); else - verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2)); + verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2)); fflush (stderr); output_needs_newline (diagnostic_buffer) = 1; record_last_error_function (); @@ -1090,19 +1092,19 @@ lhd_print_error_function (context, file) os = diagnostic_state (context); output_set_prefix ((output_buffer *) context, prefix); - + if (current_function_decl == NULL) - output_add_string ((output_buffer *) context, _("At top level:")); + output_add_string ((output_buffer *) context, _("At top level:")); else { if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) - output_printf - ((output_buffer *) context, "In member function `%s':", - (*lang_hooks.decl_printable_name) (current_function_decl, 2)); + output_printf + ((output_buffer *) context, "In member function `%s':", + (*lang_hooks.decl_printable_name) (current_function_decl, 2)); else - output_printf - ((output_buffer *) context, "In function `%s':", - (*lang_hooks.decl_printable_name) (current_function_decl, 2)); + output_printf + ((output_buffer *) context, "In function `%s':", + (*lang_hooks.decl_printable_name) (current_function_decl, 2)); } output_add_newline ((output_buffer *) context); @@ -1225,7 +1227,7 @@ internal_error VPARAMS ((const char *msgid, ...)) if (internal_error_function != 0) (*internal_error_function) (_(msgid), &ap); - + set_diagnostic_context (&dc, msgid, &ap, input_filename, lineno, /* warn = */0); report_diagnostic (&dc); @@ -1487,10 +1489,10 @@ report_problematic_module (buffer) for (p = input_file_stack->next; p; p = p->next) if (p == input_file_stack->next) output_verbatim - (buffer, "In file included from %s:%d", p->name, p->line); + (buffer, "In file included from %s:%d", p->name, p->line); else output_verbatim - (buffer, ",\n from %s:%d", p->name, p->line); + (buffer, ",\n from %s:%d", p->name, p->line); output_verbatim (buffer, ":\n"); record_last_error_module (); } @@ -1503,9 +1505,9 @@ default_diagnostic_starter (buffer, dc) { report_error_function (diagnostic_file_location (dc)); output_set_prefix (buffer, - context_as_prefix (diagnostic_file_location (dc), - diagnostic_line_location (dc), - diagnostic_is_warning (dc))); + context_as_prefix (diagnostic_file_location (dc), + diagnostic_line_location (dc), + diagnostic_is_warning (dc))); } static void @@ -1516,7 +1518,7 @@ default_diagnostic_finalizer (buffer, dc) output_destroy_prefix (buffer); } -void +void warn_deprecated_use (node) tree node; { @@ -1537,7 +1539,7 @@ warn_deprecated_use (node) else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL && DECL_NAME (TYPE_NAME (node))) what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))); - + if (what) { if (decl) diff --git a/gcc/doloop.c b/gcc/doloop.c index 6c0185cafd55..f3946dcb9a06 100644 --- a/gcc/doloop.c +++ b/gcc/doloop.c @@ -263,7 +263,7 @@ doloop_valid_p (loop, jump_insn) || ! onlyjump_p (jump_insn)) { if (loop_dump_stream) - fprintf (loop_dump_stream, + fprintf (loop_dump_stream, "Doloop: Invalid jump at loop end.\n"); return 0; } @@ -801,7 +801,7 @@ doloop_optimize (loop) &increment, &mode)) { if (loop_dump_stream) - fprintf (loop_dump_stream, + fprintf (loop_dump_stream, "Doloop: Cannot precondition loop.\n"); return 0; } diff --git a/gcc/dominance.c b/gcc/dominance.c index 8bfd09dd3bc5..3b8abdb28e87 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -1,9 +1,9 @@ /* Calculate (post)dominators in slightly super-linear time. Copyright (C) 2000 Free Software Foundation, Inc. Contributed by Michael Matz (matz@ifh.de). - + This file is part of GCC. - + GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) @@ -119,17 +119,19 @@ static void idoms_to_doms PARAMS ((struct dom_info *, /* Helper macro for allocating and initializing an array, for aesthetic reasons. */ #define init_ar(var, type, num, content) \ - do { \ - unsigned int i = 1; /* Catch content == i. */ \ - if (! (content)) \ - (var) = (type *) xcalloc ((num), sizeof (type)); \ - else \ - { \ - (var) = (type *) xmalloc ((num) * sizeof (type)); \ - for (i = 0; i < num; i++) \ - (var)[i] = (content); \ - } \ - } while (0) + do \ + { \ + unsigned int i = 1; /* Catch content == i. */ \ + if (! (content)) \ + (var) = (type *) xcalloc ((num), sizeof (type)); \ + else \ + { \ + (var) = (type *) xmalloc ((num) * sizeof (type)); \ + for (i = 0; i < num; i++) \ + (var)[i] = (content); \ + } \ + } \ + while (0) /* Allocate all needed memory in a pessimistic fashion (so we round up). This initialises the contents of DI, which already must be allocated. */ diff --git a/gcc/doschk.c b/gcc/doschk.c index ad553df7e8c3..d024efc14ce1 100644 --- a/gcc/doschk.c +++ b/gcc/doschk.c @@ -71,13 +71,13 @@ char *path; char *last_slash = strrchr (path, '/'); char *cp, *dp; int dots_seen, chars_seen; - + if (last_slash+1 == null) { * --null = '\0'; last_slash = strrchr (path, '/'); } - + if (!last_slash) { last_slash = first-1; @@ -239,7 +239,7 @@ display_problems () { ENT **elist, *ent; int ecount, i, first, first_err; - + for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++); elist = (ENT **)malloc (sizeof (ENT *) * ecount); for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++) diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 2222ecd4b3e7..53a02c7fcd5d 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -60,7 +60,7 @@ dw2_assemble_integer (size, x) else assemble_integer (x, size, BITS_PER_UNIT, 1); } - + /* Output an immediate constant in a given size. */ @@ -316,7 +316,7 @@ size_of_sleb128 (value) } /* Given an encoding, return the number of bytes the format occupies. - This is only defined for fixed-size encodings, and so does not + This is only defined for fixed-size encodings, and so does not include leb128. */ int @@ -845,7 +845,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding, { restart: /* Allow the target first crack at emitting this. Some of the - special relocations require special directives instead of + special relocations require special directives instead of just ".4byte" or whatever. */ #ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (asm_out_file, encoding, size, @@ -883,7 +883,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding, break; default: - /* Other encodings should have been handled by + /* Other encodings should have been handled by ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */ abort (); } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9c0c6340d75c..47edc4339e7a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -344,15 +344,17 @@ static void def_cfa_1 PARAMS ((const char *, #ifdef SET_ASM_OP #ifndef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL -#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ - do { \ - fprintf (FILE, "%s", SET_ASM_OP); \ - assemble_name (FILE, SY); \ - fputc (',', FILE); \ - assemble_name (FILE, HI); \ - fputc ('-', FILE); \ - assemble_name (FILE, LO); \ - } while (0) +#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ + do \ + { \ + fprintf (FILE, "%s", SET_ASM_OP); \ + assemble_name (FILE, SY); \ + fputc (',', FILE); \ + assemble_name (FILE, HI); \ + fputc ('-', FILE); \ + assemble_name (FILE, LO); \ + } \ + while (0) #endif #endif diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 599db3a06494..b63e16c4cb49 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -523,7 +523,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA are still being discussed. Also, we in the PLSIG are still discussing whether or not we need to do anything special for C++ templates. (At this time it is not yet clear whether we even need to do anything special for - these.) + these.) With regard to FORTRAN, the UI/PLSIG has defined what is believed to be a complete and sufficient set of codes and rules for adequately representing @@ -560,7 +560,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA Other possible `compacting' transformations designed to save disk space and to reduce linker & debugger I/O activity. -*/ +*/ #include "config.h" @@ -1287,7 +1287,7 @@ static void retry_incomplete_types PARAMS ((void)); ASM_OUTPUT_ASCII ((FILE), P, strlen (P)+1) #else #define ASM_OUTPUT_DWARF_STRING_NEWLINE(FILE,P) \ - ASM_OUTPUT_DWARF_STRING (FILE,P), ASM_OUTPUT_DWARF_STRING (FILE,"\n") + ASM_OUTPUT_DWARF_STRING (FILE,P), ASM_OUTPUT_DWARF_STRING (FILE,"\n") #endif @@ -1323,7 +1323,7 @@ is_pseudo_reg (rtl) rtx rtl; { return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER)) - || ((GET_CODE (rtl) == SUBREG) + || ((GET_CODE (rtl) == SUBREG) && (REGNO (SUBREG_REG (rtl)) >= FIRST_PSEUDO_REGISTER))); } @@ -1341,7 +1341,7 @@ type_main_variant (type) if (TREE_CODE (type) == ARRAY_TYPE) { while (type != TYPE_MAIN_VARIANT (type)) - type = TYPE_MAIN_VARIANT (type); + type = TYPE_MAIN_VARIANT (type); } return type; @@ -1607,7 +1607,7 @@ static tree decl_ultimate_origin (decl) tree decl; { -#ifdef ENABLE_CHECKING +#ifdef ENABLE_CHECKING if (DECL_FROM_INLINE (DECL_ORIGIN (decl))) /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the most distant ancestor, this should never happen. */ @@ -1705,7 +1705,7 @@ output_signed_leb128 (value) if (negative) value |= 0xfe000000; /* manually sign extend */ if (((value == 0) && ((byte & 0x40) == 0)) - || ((value == -1) && ((byte & 0x40) == 1))) + || ((value == -1) && ((byte & 0x40) == 1))) more = 0; else { @@ -2839,8 +2839,8 @@ location_or_const_value_attribute (decl) if (rtl == NULL_RTX || is_pseudo_reg (rtl)) { /* This decl represents a formal parameter which was optimized out. */ - tree declared_type = type_main_variant (TREE_TYPE (decl)); - tree passed_type = type_main_variant (DECL_ARG_TYPE (decl)); + tree declared_type = type_main_variant (TREE_TYPE (decl)); + tree passed_type = type_main_variant (DECL_ARG_TYPE (decl)); /* Note that DECL_INCOMING_RTL may be NULL in here, but we handle *all* cases where (rtl == NULL_RTX) just below. */ @@ -3464,10 +3464,10 @@ pure_or_virtual_attribute (func_decl) { #if 0 /* DECL_ABSTRACT_VIRTUAL_P is C++-specific. */ if (DECL_ABSTRACT_VIRTUAL_P (func_decl)) - ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_pure_virtual); + ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_pure_virtual); else #endif - ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual); + ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); } } @@ -3506,7 +3506,7 @@ name_and_src_coords_attributes (decl) file_index = lookup_filename (DECL_SOURCE_FILE (decl)); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION); - src_coords_attribute (file_index, DECL_SOURCE_LINE (decl)); + src_coords_attribute (file_index, DECL_SOURCE_LINE (decl)); } #endif /* defined(DWARF_DECL_COORDINATES) */ } @@ -3587,7 +3587,7 @@ type_tag (type) if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) t = TYPE_NAME (type); - /* The g++ front end makes the TYPE_NAME of *each* tagged type point to + /* The g++ front end makes the TYPE_NAME of *each* tagged type point to a TYPE_DECL node, regardless of whether or not a `typedef' was involved. */ else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL @@ -4168,7 +4168,7 @@ output_compile_unit_die (arg) sf_names_attribute (SFNAMES_BEGIN_LABEL); src_info_attribute (SRCINFO_BEGIN_LABEL); if (debug_info_level >= DINFO_LEVEL_VERBOSE) - mac_info_attribute (MACINFO_BEGIN_LABEL); + mac_info_attribute (MACINFO_BEGIN_LABEL); } } @@ -4211,7 +4211,7 @@ output_inheritance_die (arg) ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); } -} +} static void output_structure_type_die (arg) @@ -4795,7 +4795,7 @@ output_type (type, containing_scope) end_sibling_chain (); break; - case ARRAY_TYPE: + case ARRAY_TYPE: if (TYPE_STRING_FLAG (type) && TREE_CODE(TREE_TYPE(type)) == CHAR_TYPE) { output_type (TREE_TYPE (type), containing_scope); @@ -5150,8 +5150,8 @@ output_decls_for_scope (stmt, depth) tree subblocks; for (subblocks = BLOCK_SUBBLOCKS (stmt); - subblocks; - subblocks = BLOCK_CHAIN (subblocks)) + subblocks; + subblocks = BLOCK_CHAIN (subblocks)) output_block (subblocks, depth + 1); } } @@ -5197,10 +5197,10 @@ output_decl (decl, containing_scope) if ((TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE) && ((DECL_NAME (decl) == 0 && TYPE_NAME (TREE_TYPE (decl)) == 0) - || (TYPE_FIELDS (TREE_TYPE (decl)) + || (TYPE_FIELDS (TREE_TYPE (decl)) && (TREE_CODE (TYPE_FIELDS (TREE_TYPE (decl))) == ERROR_MARK)))) return; - + /* If this ..._DECL node is marked to be ignored, then ignore it. */ if (DECL_IGNORED_P (decl)) @@ -5325,7 +5325,7 @@ output_decl (decl, containing_scope) for (parm = arg_decls; parm; parm = TREE_CHAIN (parm)) if (TREE_CODE (parm) == PARM_DECL) - { + { if (DECL_NAME(parm) && !strcmp(IDENTIFIER_POINTER(DECL_NAME(parm)), "__builtin_va_alist") ) @@ -5362,13 +5362,13 @@ output_decl (decl, containing_scope) /* this is the prototyped case, check for ... */ if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node) output_die (output_unspecified_parameters_die, decl); - } - else - { - /* this is unprototyped, check for undefined (just declaration) */ - if (!DECL_INITIAL (decl)) - output_die (output_unspecified_parameters_die, decl); - } + } + else + { + /* this is unprototyped, check for undefined (just declaration) */ + if (!DECL_INITIAL (decl)) + output_die (output_unspecified_parameters_die, decl); + } } /* Output Dwarf info for all of the stuff within the body of the @@ -5427,7 +5427,7 @@ output_decl (decl, containing_scope) if (debug_info_level <= DINFO_LEVEL_TERSE) if (! TYPE_DECL_IS_STUB (decl) || (! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl)) && ! in_class)) - return; + return; /* In the special case of a TYPE_DECL node representing the declaration of some type tag, if the given TYPE_DECL is @@ -5468,7 +5468,7 @@ output_decl (decl, containing_scope) any variable declarations or definitions. */ if (debug_info_level <= DINFO_LEVEL_TERSE) - break; + break; /* Output any DIEs that are needed to specify the type of this data object. */ @@ -5502,7 +5502,7 @@ output_decl (decl, containing_scope) function. */ { - void (*func) PARAMS ((void *)); + void (*func) PARAMS ((void *)); register tree origin = decl_ultimate_origin (decl); if (origin != NULL && TREE_CODE (origin) == PARM_DECL) @@ -5523,7 +5523,7 @@ output_decl (decl, containing_scope) if (DECL_NAME (decl) != 0) { output_type (member_declared_type (decl), containing_scope); - output_die (output_member_die, decl); + output_die (output_member_die, decl); } break; @@ -5623,7 +5623,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) these same functions should NOT be ignored however. */ if (DECL_EXTERNAL (decl) && DECL_FUNCTION_CODE (decl)) - return; + return; /* What we would really like to do here is to filter out all mere file-scope declarations of file-scope functions which are never @@ -5723,7 +5723,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); ASM_OUTPUT_DWARF_ADDR (asm_out_file, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); - ASM_OUTPUT_DWARF_DATA4 (asm_out_file, + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, (unsigned) int_size_in_bytes (TREE_TYPE (decl))); ASM_OUTPUT_POP_SECTION (asm_out_file); } @@ -5733,7 +5733,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) any variable declarations or definitions. */ if (debug_info_level <= DINFO_LEVEL_TERSE) - return; + return; break; @@ -5771,7 +5771,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) if (debug_info_level <= DINFO_LEVEL_TERSE) if (! TYPE_DECL_IS_STUB (decl) || ! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl))) - return; + return; break; @@ -5801,7 +5801,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) if this is not a nested function or class. If this is a nested type, then the remaining pending_types will be emitted when the containing type is handled. */ - + if (! DECL_CONTEXT (decl)) { if (pending_types != 0) @@ -5930,9 +5930,9 @@ generate_new_sfname_entry () sprintf (label, SFNAMES_ENTRY_LABEL_FMT, filename_table[0].number); ASM_OUTPUT_LABEL (asm_out_file, label); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, - filename_table[0].name - ? filename_table[0].name - : ""); + filename_table[0].name + ? filename_table[0].name + : ""); ASM_OUTPUT_POP_SECTION (asm_out_file); } @@ -5984,7 +5984,7 @@ lookup_filename (file_name) same filename will find it as quickly as possible. */ shuffle_filename_entry (search_p); - return filename_table[0].number; + return filename_table[0].number; } /* We come here whenever we have a new filename which is not registered @@ -6062,18 +6062,18 @@ dwarfout_source_line (line, filename) ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); if (this_file_entry_num != prev_file_entry_num) - { - char line_entry_label[MAX_ARTIFICIAL_LABEL_BYTES]; + { + char line_entry_label[MAX_ARTIFICIAL_LABEL_BYTES]; - sprintf (line_entry_label, LINE_ENTRY_LABEL_FMT, last_line_entry_num); - ASM_OUTPUT_LABEL (asm_out_file, line_entry_label); - } + sprintf (line_entry_label, LINE_ENTRY_LABEL_FMT, last_line_entry_num); + ASM_OUTPUT_LABEL (asm_out_file, line_entry_label); + } { - const char *tail = strrchr (filename, '/'); + const char *tail = strrchr (filename, '/'); - if (tail != NULL) - filename = tail; + if (tail != NULL) + filename = tail; } dw2_asm_output_data (4, line, "%s:%u", filename, line); @@ -6082,7 +6082,7 @@ dwarfout_source_line (line, filename) ASM_OUTPUT_POP_SECTION (asm_out_file); if (this_file_entry_num != prev_file_entry_num) - generate_srcinfo_entry (last_line_entry_num, this_file_entry_num); + generate_srcinfo_entry (last_line_entry_num, this_file_entry_num); prev_file_entry_num = this_file_entry_num; } } @@ -6275,7 +6275,7 @@ dwarfout_init (main_input_filename) /* Output a starting label and an initial (compilation directory) entry for the .debug_sfnames section. The starting label will be referenced by the initial entry in the .debug_srcinfo section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION); ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); @@ -6292,29 +6292,29 @@ dwarfout_init (main_input_filename) } ASM_OUTPUT_POP_SECTION (asm_out_file); } - + if (debug_info_level >= DINFO_LEVEL_VERBOSE && use_gnu_debug_info_extensions) { - /* Output a starting label for the .debug_macinfo section. This + /* Output a starting label for the .debug_macinfo section. This label will be referenced by the AT_mac_info attribute in the TAG_compile_unit DIE. */ - - fputc ('\n', asm_out_file); - ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION); - ASM_OUTPUT_LABEL (asm_out_file, MACINFO_BEGIN_LABEL); - ASM_OUTPUT_POP_SECTION (asm_out_file); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION); + ASM_OUTPUT_LABEL (asm_out_file, MACINFO_BEGIN_LABEL); + ASM_OUTPUT_POP_SECTION (asm_out_file); } /* Generate the initial entry for the .line section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); ASM_OUTPUT_LABEL (asm_out_file, LINE_BEGIN_LABEL); ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, LINE_END_LABEL, LINE_BEGIN_LABEL); ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_BEGIN_LABEL); ASM_OUTPUT_POP_SECTION (asm_out_file); - + if (use_gnu_debug_info_extensions) { /* Generate the initial entry for the .debug_srcinfo section. */ @@ -6333,16 +6333,16 @@ dwarfout_init (main_input_filename) #endif ASM_OUTPUT_POP_SECTION (asm_out_file); } - + /* Generate the initial entry for the .debug_pubnames section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION); ASM_OUTPUT_DWARF_ADDR (asm_out_file, DEBUG_BEGIN_LABEL); ASM_OUTPUT_POP_SECTION (asm_out_file); - + /* Generate the initial entry for the .debug_aranges section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, @@ -6468,7 +6468,7 @@ dwarfout_finish (main_input_filename) if (debug_info_level >= DINFO_LEVEL_NORMAL) { /* Output a terminating entry for the .line section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); ASM_OUTPUT_LABEL (asm_out_file, LINE_LAST_ENTRY_LABEL); @@ -6477,7 +6477,7 @@ dwarfout_finish (main_input_filename) ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, TEXT_END_LABEL, TEXT_BEGIN_LABEL); ASM_OUTPUT_LABEL (asm_out_file, LINE_END_LABEL); ASM_OUTPUT_POP_SECTION (asm_out_file); - + if (use_gnu_debug_info_extensions) { /* Output a terminating entry for the .debug_srcinfo section. */ @@ -6493,7 +6493,7 @@ dwarfout_finish (main_input_filename) if (debug_info_level >= DINFO_LEVEL_VERBOSE) { /* Output terminating entries for the .debug_macinfo section. */ - + dwarfout_end_source_file (0); fputc ('\n', asm_out_file); @@ -6502,15 +6502,15 @@ dwarfout_finish (main_input_filename) ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_POP_SECTION (asm_out_file); } - + /* Generate the terminating entry for the .debug_pubnames section. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION); ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_POP_SECTION (asm_out_file); - + /* Generate the terminating entries for the .debug_aranges section. Note that we want to do this only *after* we have output the end @@ -6524,7 +6524,7 @@ dwarfout_finish (main_input_filename) entries at this late point in the assembly output, we skirt the issue simply by avoiding forward-references. */ - + fputc ('\n', asm_out_file); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); -- 2.39.5