This is the mail archive of the gcc-patches@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: [PATCH]: Fix -Wc++-compat and -Wcast-qual warnings [a-d]*.c


On Wed, Jun 25, 2008 at 8:53 PM, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This patch cleans up -Wc++-compat and/or -Wcast-qual warnings in [a-d]*.c
> top level files.  After applying this patch on top of the others, I have
> only around 10 warnings left.  Some of the remaining warnings may or may
> not be a bug, so I wanted to deal with them separately/last.  I'll address
> them specifically after the easy ones are installed.
>
> There are surely a bunch of warnings left in cross-targets, and I haven't
> tried ada yet.  But I'm almost finished... :-)
>
> Bootstrapped on x86_64-unknown-linux-gnu in conjunction with the previous
> warning fix patches.  No regressions.
>
> Okay for mainline?

Ok.

Richard.

>                Thanks,
>                --Kaveh
>
>
>
>
> 2008-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
>        * alias.c (record_alias_subset, init_alias_analysis): Fix
>        -Wc++-compat and/or -Wcast-qual warnings.
>        * attribs.c (lookup_attribute_spec): Likewise.
>        * bb-reorder.c (find_traces, rotate_loop, find_traces_1_round,
>        copy_bb, connect_traces,
>        find_rarely_executed_basic_blocks_and_cr): Likewise.
>        * bt-load.c (find_btr_def_group, add_btr_def, new_btr_user,
>        note_btr_set, migrate_btr_defs): Likewise.
>        * builtins.c (result_vector, expand_builtin_memcpy,
>        expand_builtin_mempcpy_args, expand_builtin_strncpy,
>        builtin_memset_read_str, expand_builtin_printf,
>        fold_builtin_memchr, rewrite_call_expr, fold_builtin_printf):
>        Likewise.
>        * caller-save.c (mark_set_regs): Likewise.
>        * calls.c (expand_call, emit_library_call_value_1): Likewise.
>        * cgraph.c (cgraph_edge): Likewise.
>        * combine.c (likely_spilled_retval_1): Likewise.
>        * coverage.c (htab_counts_entry_hash, htab_counts_entry_eq,
>        htab_counts_entry_del, get_coverage_counts): Likewise.
>        * cselib.c (new_elt_list, new_elt_loc_list, entry_and_rtx_equal_p,
>        new_cselib_val): Likewise.
>        * dbgcnt.c (dbg_cnt_process_opt): Likewise.
>        * dbxout.c (dbxout_init, dbxout_type, output_used_types_helper):
>        Likewise.
>        * df-core.c (df_compact_blocks): Likewise.
>        * df-problems.c (df_grow_bb_info, df_chain_create): Likewise.
>        * df-scan.c (df_grow_reg_info, df_ref_create,
>        df_insn_create_insn_record, df_insn_rescan, df_notes_rescan,
>        df_ref_compare, df_ref_create_structure, df_bb_refs_record,
>        df_record_entry_block_defs, df_record_exit_block_uses,
>        df_bb_verify): Likewise.
>        * df.h (DF_REF_EXTRACT_WIDTH_CONST, DF_REF_EXTRACT_OFFSET_CONST,
>        DF_REF_EXTRACT_MODE_CONST): New.
>        * dominance.c (get_immediate_dominator, get_dominated_by,
>        nearest_common_dominator, root_of_dom_tree,
>        iterate_fix_dominators, first_dom_son, next_dom_son): Fix
>        -Wc++-compat and/or -Wcast-qual warnings.
>        * dse.c (clear_alias_set_lookup, get_group_info, gen_rtx_MEM,
>        record_store, replace_read, check_mem_read_rtx, scan_insn,
>        dse_step1, dse_record_singleton_alias_set): Likewise.
>        * dwarf2asm.c (dw2_force_const_mem): Likewise.
>
> diff -rup orig/egcc-SVN20080624/gcc/alias.c egcc-SVN20080624/gcc/alias.c
> --- orig/egcc-SVN20080624/gcc/alias.c   2008-06-12 02:02:20.000000000 +0200
> +++ egcc-SVN20080624/gcc/alias.c        2008-06-25 02:41:37.000000000 +0200
> @@ -713,7 +713,7 @@ record_alias_subset (alias_set_type supe
>     {
>       /* Create an entry for the SUPERSET, so that we have a place to
>         attach the SUBSET.  */
> -      superset_entry = ggc_alloc (sizeof (struct alias_set_entry));
> +      superset_entry = GGC_NEW (struct alias_set_entry);
>       superset_entry->alias_set = superset;
>       superset_entry->children
>        = splay_tree_new_ggc (splay_tree_compare_ints);
> @@ -2412,8 +2412,8 @@ init_alias_analysis (void)
>   timevar_push (TV_ALIAS_ANALYSIS);
>
>   reg_known_value_size = maxreg - FIRST_PSEUDO_REGISTER;
> -  reg_known_value = ggc_calloc (reg_known_value_size, sizeof (rtx));
> -  reg_known_equiv_p = xcalloc (reg_known_value_size, sizeof (bool));
> +  reg_known_value = GGC_CNEWVEC (rtx, reg_known_value_size);
> +  reg_known_equiv_p = XCNEWVEC (bool, reg_known_value_size);
>
>   /* If we have memory allocated from the previous run, use it.  */
>   if (old_reg_base_value)
> diff -rup orig/egcc-SVN20080624/gcc/attribs.c egcc-SVN20080624/gcc/attribs.c
> --- orig/egcc-SVN20080624/gcc/attribs.c 2008-04-12 02:01:43.000000000 +0200
> +++ egcc-SVN20080624/gcc/attribs.c      2008-06-25 02:39:02.000000000 +0200
> @@ -206,8 +206,9 @@ lookup_attribute_spec (tree name)
>   attr.str = IDENTIFIER_POINTER (name);
>   attr.length = IDENTIFIER_LENGTH (name);
>   extract_attribute_substring (&attr);
> -  return htab_find_with_hash (attribute_hash, &attr,
> -                             substring_hash (attr.str, attr.length));
> +  return (const struct attribute_spec *)
> +    htab_find_with_hash (attribute_hash, &attr,
> +                        substring_hash (attr.str, attr.length));
>  }
>
>  /* Process the attributes listed in ATTRIBUTES and install them in *NODE,
> diff -rup orig/egcc-SVN20080624/gcc/bb-reorder.c egcc-SVN20080624/gcc/bb-reorder.c
> --- orig/egcc-SVN20080624/gcc/bb-reorder.c      2008-06-07 02:02:46.000000000 +0200
> +++ egcc-SVN20080624/gcc/bb-reorder.c   2008-06-25 02:38:29.000000000 +0200
> @@ -278,7 +278,7 @@ find_traces (int *n_traces, struct trace
>          basic_block bb;
>          fprintf (dump_file, "Trace %d (round %d):  ", i + 1,
>                   traces[i].round + 1);
> -         for (bb = traces[i].first; bb != traces[i].last; bb = bb->aux)
> +         for (bb = traces[i].first; bb != traces[i].last; bb = (basic_block) bb->aux)
>            fprintf (dump_file, "%d [%d] ", bb->index, bb->frequency);
>          fprintf (dump_file, "%d [%d]\n", bb->index, bb->frequency);
>        }
> @@ -358,7 +358,7 @@ rotate_loop (edge back_edge, struct trac
>                }
>            }
>        }
> -      bb = bb->aux;
> +      bb = (basic_block) bb->aux;
>     }
>   while (bb != back_edge->dest);
>
> @@ -368,7 +368,7 @@ rotate_loop (edge back_edge, struct trac
>         the trace.  */
>       if (back_edge->dest == trace->first)
>        {
> -         trace->first = best_bb->aux;
> +         trace->first = (basic_block) best_bb->aux;
>        }
>       else
>        {
> @@ -376,7 +376,7 @@ rotate_loop (edge back_edge, struct trac
>
>          for (prev_bb = trace->first;
>               prev_bb->aux != back_edge->dest;
> -              prev_bb = prev_bb->aux)
> +              prev_bb = (basic_block) prev_bb->aux)
>            ;
>          prev_bb->aux = best_bb->aux;
>
> @@ -442,7 +442,7 @@ find_traces_1_round (int branch_th, int
>       fibheapkey_t key;
>       edge_iterator ei;
>
> -      bb = fibheap_extract_min (*heap);
> +      bb = (basic_block) fibheap_extract_min (*heap);
>       bbd[bb->index].heap = NULL;
>       bbd[bb->index].node = NULL;
>
> @@ -780,7 +780,7 @@ copy_bb (basic_block old_bb, edge e, bas
>
>       new_size = MAX (last_basic_block, new_bb->index + 1);
>       new_size = GET_ARRAY_SIZE (new_size);
> -      bbd = xrealloc (bbd, new_size * sizeof (bbro_basic_block_data));
> +      bbd = XRESIZEVEC (bbro_basic_block_data, bbd, new_size);
>       for (i = array_size; i < new_size; i++)
>        {
>          bbd[i].start_of_trace = -1;
> @@ -1143,7 +1143,7 @@ connect_traces (int n_traces, struct tra
>       basic_block bb;
>
>       fprintf (dump_file, "Final order:\n");
> -      for (bb = traces[0].first; bb; bb = bb->aux)
> +      for (bb = traces[0].first; bb; bb = (basic_block) bb->aux)
>        fprintf (dump_file, "%d ", bb->index);
>       fprintf (dump_file, "\n");
>       fflush (dump_file);
> @@ -1251,8 +1251,7 @@ find_rarely_executed_basic_blocks_and_cr
>          if (i == *max_idx)
>            {
>              *max_idx *= 2;
> -             *crossing_edges = xrealloc (*crossing_edges,
> -                                        (*max_idx) * sizeof (edge));
> +             *crossing_edges = XRESIZEVEC (edge, *crossing_edges, *max_idx);
>            }
>          (*crossing_edges)[i++] = e;
>        }
> diff -rup orig/egcc-SVN20080624/gcc/bt-load.c egcc-SVN20080624/gcc/bt-load.c
> --- orig/egcc-SVN20080624/gcc/bt-load.c 2008-04-26 02:01:49.000000000 +0200
> +++ egcc-SVN20080624/gcc/bt-load.c      2008-06-25 02:33:23.000000000 +0200
> @@ -279,8 +279,7 @@ find_btr_def_group (btr_def_group *all_b
>
>       if (!this_group)
>        {
> -         this_group = obstack_alloc (&migrate_btrl_obstack,
> -                                     sizeof (struct btr_def_group_s));
> +         this_group = XOBNEW (&migrate_btrl_obstack, struct btr_def_group_s);
>          this_group->src = def_src;
>          this_group->members = NULL;
>          this_group->next = *all_btr_def_groups;
> @@ -303,7 +302,7 @@ add_btr_def (fibheap_t all_btr_defs, bas
>             btr_def_group *all_btr_def_groups)
>  {
>   btr_def this
> -    = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
> +    = XOBNEW (&migrate_btrl_obstack, struct btr_def_s);
>   this->bb = bb;
>   this->luid = insn_luid;
>   this->insn = insn;
> @@ -354,7 +353,7 @@ new_btr_user (basic_block bb, int insn_l
>        usep = NULL;
>     }
>   use = usep ? *usep : NULL_RTX;
> -  user = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
> +  user = XOBNEW (&migrate_btrl_obstack, struct btr_user_s);
>   user->bb = bb;
>   user->luid = insn_luid;
>   user->insn = insn;
> @@ -425,7 +424,7 @@ typedef struct {
>  static void
>  note_btr_set (rtx dest, const_rtx set ATTRIBUTE_UNUSED, void *data)
>  {
> -  defs_uses_info *info = data;
> +  defs_uses_info *info = (defs_uses_info *) data;
>   int regno, end_regno;
>
>   if (!REG_P (dest))
> @@ -1428,14 +1427,14 @@ migrate_btr_defs (enum reg_class btr_cla
>          first_btr = reg;
>       }
>
> -  btrs_live = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
> -  btrs_live_at_end = xcalloc (n_basic_blocks, sizeof (HARD_REG_SET));
> +  btrs_live = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
> +  btrs_live_at_end = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
>
>   build_btr_def_use_webs (all_btr_defs);
>
>   while (!fibheap_empty (all_btr_defs))
>     {
> -      btr_def def = fibheap_extract_min (all_btr_defs);
> +      btr_def def = (btr_def) fibheap_extract_min (all_btr_defs);
>       int min_cost = -fibheap_min_key (all_btr_defs);
>       if (migrate_btr_def (def, min_cost))
>        {
> diff -rup orig/egcc-SVN20080624/gcc/builtins.c egcc-SVN20080624/gcc/builtins.c
> --- orig/egcc-SVN20080624/gcc/builtins.c        2008-06-19 22:58:16.000000000 +0200
> +++ egcc-SVN20080624/gcc/builtins.c     2008-06-25 02:31:30.000000000 +0200
> @@ -1290,7 +1290,7 @@ result_vector (int savep, rtx result)
>   int regno, size, align, nelts;
>   enum machine_mode mode;
>   rtx reg, mem;
> -  rtx *savevec = alloca (FIRST_PSEUDO_REGISTER * sizeof (rtx));
> +  rtx *savevec = XALLOCAVEC (rtx, FIRST_PSEUDO_REGISTER);
>
>   size = nelts = 0;
>   for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> @@ -3325,11 +3325,13 @@ expand_builtin_memcpy (tree exp, rtx tar
>          && GET_CODE (len_rtx) == CONST_INT
>          && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= strlen (src_str) + 1
>          && can_store_by_pieces (INTVAL (len_rtx), builtin_memcpy_read_str,
> -                                 (void *) src_str, dest_align, false))
> +                                 CONST_CAST (char *, src_str),
> +                                 dest_align, false))
>        {
>          dest_mem = store_by_pieces (dest_mem, INTVAL (len_rtx),
>                                      builtin_memcpy_read_str,
> -                                     (void *) src_str, dest_align, false, 0);
> +                                     CONST_CAST (char *, src_str),
> +                                     dest_align, false, 0);
>          dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
>          dest_mem = convert_memory_address (ptr_mode, dest_mem);
>          return dest_mem;
> @@ -3438,14 +3440,15 @@ expand_builtin_mempcpy_args (tree dest,
>          && GET_CODE (len_rtx) == CONST_INT
>          && (unsigned HOST_WIDE_INT) INTVAL (len_rtx) <= strlen (src_str) + 1
>          && can_store_by_pieces (INTVAL (len_rtx), builtin_memcpy_read_str,
> -                                 (void *) src_str, dest_align, false))
> +                                 CONST_CAST (char *, src_str),
> +                                 dest_align, false))
>        {
>          dest_mem = get_memory_rtx (dest, len);
>          set_mem_align (dest_mem, dest_align);
>          dest_mem = store_by_pieces (dest_mem, INTVAL (len_rtx),
>                                      builtin_memcpy_read_str,
> -                                     (void *) src_str, dest_align,
> -                                     false, endp);
> +                                     CONST_CAST (char *, src_str),
> +                                     dest_align, false, endp);
>          dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
>          dest_mem = convert_memory_address (ptr_mode, dest_mem);
>          return dest_mem;
> @@ -3787,13 +3790,14 @@ expand_builtin_strncpy (tree exp, rtx ta
>          if (!p || dest_align == 0 || !host_integerp (len, 1)
>              || !can_store_by_pieces (tree_low_cst (len, 1),
>                                       builtin_strncpy_read_str,
> -                                      (void *) p, dest_align, false))
> +                                      CONST_CAST (char *, p),
> +                                      dest_align, false))
>            return NULL_RTX;
>
>          dest_mem = get_memory_rtx (dest, len);
>          store_by_pieces (dest_mem, tree_low_cst (len, 1),
>                           builtin_strncpy_read_str,
> -                          (void *) p, dest_align, false, 0);
> +                          CONST_CAST (char *, p), dest_align, false, 0);
>          dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
>          dest_mem = convert_memory_address (ptr_mode, dest_mem);
>          return dest_mem;
> @@ -3811,7 +3815,7 @@ builtin_memset_read_str (void *data, HOS
>                         enum machine_mode mode)
>  {
>   const char *c = (const char *) data;
> -  char *p = alloca (GET_MODE_SIZE (mode));
> +  char *p = XALLOCAVEC (char, GET_MODE_SIZE (mode));
>
>   memset (p, *c, GET_MODE_SIZE (mode));
>
> @@ -3835,7 +3839,7 @@ builtin_memset_gen_str (void *data, HOST
>   if (size == 1)
>     return (rtx) data;
>
> -  p = alloca (size);
> +  p = XALLOCAVEC (char, size);
>   memset (p, 1, size);
>   coeff = c_readstr (p, mode);
>
> @@ -5309,7 +5313,7 @@ expand_builtin_printf (tree exp, rtx tar
>            {
>              /* Create a NUL-terminated string that's one char shorter
>                 than the original, stripping off the trailing '\n'.  */
> -             char *newstr = alloca (len);
> +             char *newstr = XALLOCAVEC (char, len);
>              memcpy (newstr, fmt_str, len - 1);
>              newstr[len - 1] = 0;
>              arg = build_string_literal (len, newstr);
> @@ -8900,7 +8904,7 @@ fold_builtin_memchr (tree arg1, tree arg
>          if (target_char_cast (arg2, &c))
>            return NULL_TREE;
>
> -         r = memchr (p1, c, tree_low_cst (len, 1));
> +         r = (char *) memchr (p1, c, tree_low_cst (len, 1));
>
>          if (r == NULL)
>            return build_int_cst (TREE_TYPE (arg1), 0);
> @@ -10750,7 +10754,7 @@ rewrite_call_expr (tree exp, int skip, t
>       int i, j;
>       va_list ap;
>
> -      buffer = alloca (nargs * sizeof (tree));
> +      buffer = XALLOCAVEC (tree, nargs);
>       va_start (ap, n);
>       for (i = 0; i < n; i++)
>        buffer[i] = va_arg (ap, tree);
> @@ -12467,7 +12471,7 @@ fold_builtin_printf (tree fndecl, tree f
>            {
>              /* Create a NUL-terminated string that's one char shorter
>                 than the original, stripping off the trailing '\n'.  */
> -             char *newstr = alloca (len);
> +             char *newstr = XALLOCAVEC (char, len);
>              memcpy (newstr, str, len - 1);
>              newstr[len - 1] = 0;
>
> diff -rup orig/egcc-SVN20080624/gcc/caller-save.c egcc-SVN20080624/gcc/caller-save.c
> --- orig/egcc-SVN20080624/gcc/caller-save.c     2008-05-27 02:02:39.000000000 +0200
> +++ egcc-SVN20080624/gcc/caller-save.c  2008-06-25 02:26:04.000000000 +0200
> @@ -516,7 +516,7 @@ static void
>  mark_set_regs (rtx reg, const_rtx setter ATTRIBUTE_UNUSED, void *data)
>  {
>   int regno, endregno, i;
> -  HARD_REG_SET *this_insn_sets = data;
> +  HARD_REG_SET *this_insn_sets = (HARD_REG_SET *) data;
>
>   if (GET_CODE (reg) == SUBREG)
>     {
> diff -rup orig/egcc-SVN20080624/gcc/calls.c egcc-SVN20080624/gcc/calls.c
> --- orig/egcc-SVN20080624/gcc/calls.c   2008-06-24 02:01:59.000000000 +0200
> +++ egcc-SVN20080624/gcc/calls.c        2008-06-25 02:25:44.000000000 +0200
> @@ -2214,7 +2214,7 @@ expand_call (tree exp, rtx target, int i
>     n_named_args = num_actuals;
>
>   /* Make a vector to hold all the information about each arg.  */
> -  args = alloca (num_actuals * sizeof (struct arg_data));
> +  args = XALLOCAVEC (struct arg_data, num_actuals);
>   memset (args, 0, num_actuals * sizeof (struct arg_data));
>
>   /* Build up entries in the ARGS array, compute the size of the
> @@ -3316,7 +3316,7 @@ emit_library_call_value_1 (int retval, r
>      of the full argument passing conventions to limit complexity here since
>      library functions shouldn't have many args.  */
>
> -  argvec = alloca ((nargs + 1) * sizeof (struct arg));
> +  argvec = XALLOCAVEC (struct arg, nargs + 1);
>   memset (argvec, 0, (nargs + 1) * sizeof (struct arg));
>
>  #ifdef INIT_CUMULATIVE_LIBCALL_ARGS
> diff -rup orig/egcc-SVN20080624/gcc/cgraph.c egcc-SVN20080624/gcc/cgraph.c
> --- orig/egcc-SVN20080624/gcc/cgraph.c  2008-06-19 02:02:18.000000000 +0200
> +++ egcc-SVN20080624/gcc/cgraph.c       2008-06-25 02:24:50.000000000 +0200
> @@ -262,8 +262,9 @@ cgraph_edge (struct cgraph_node *node, t
>   int n = 0;
>
>   if (node->call_site_hash)
> -    return htab_find_with_hash (node->call_site_hash, call_stmt,
> -                               htab_hash_pointer (call_stmt));
> +    return (struct cgraph_edge *)
> +      htab_find_with_hash (node->call_site_hash, call_stmt,
> +                          htab_hash_pointer (call_stmt));
>
>   /* This loop may turn out to be performance problem.  In such case adding
>      hashtables into call nodes with very many edges is probably best
> diff -rup orig/egcc-SVN20080624/gcc/combine.c egcc-SVN20080624/gcc/combine.c
> --- orig/egcc-SVN20080624/gcc/combine.c 2008-06-18 02:02:26.000000000 +0200
> +++ egcc-SVN20080624/gcc/combine.c      2008-06-25 02:24:11.000000000 +0200
> @@ -2021,7 +2021,8 @@ struct likely_spilled_retval_info
>  static void
>  likely_spilled_retval_1 (rtx x, const_rtx set, void *data)
>  {
> -  struct likely_spilled_retval_info *info = data;
> +  struct likely_spilled_retval_info *const info =
> +    (struct likely_spilled_retval_info *) data;
>   unsigned regno, nregs;
>   unsigned new_mask;
>
> diff -rup orig/egcc-SVN20080624/gcc/coverage.c egcc-SVN20080624/gcc/coverage.c
> --- orig/egcc-SVN20080624/gcc/coverage.c        2008-06-07 02:02:46.000000000 +0200
> +++ egcc-SVN20080624/gcc/coverage.c     2008-06-25 02:23:35.000000000 +0200
> @@ -141,7 +141,7 @@ get_gcov_unsigned_t (void)
>  static hashval_t
>  htab_counts_entry_hash (const void *of)
>  {
> -  const counts_entry_t *entry = of;
> +  const counts_entry_t *const entry = (const counts_entry_t *) of;
>
>   return entry->ident * GCOV_COUNTERS + entry->ctr;
>  }
> @@ -149,8 +149,8 @@ htab_counts_entry_hash (const void *of)
>  static int
>  htab_counts_entry_eq (const void *of1, const void *of2)
>  {
> -  const counts_entry_t *entry1 = of1;
> -  const counts_entry_t *entry2 = of2;
> +  const counts_entry_t *const entry1 = (const counts_entry_t *) of1;
> +  const counts_entry_t *const entry2 = (const counts_entry_t *) of2;
>
>   return entry1->ident == entry2->ident && entry1->ctr == entry2->ctr;
>  }
> @@ -158,7 +158,7 @@ htab_counts_entry_eq (const void *of1, c
>  static void
>  htab_counts_entry_del (void *of)
>  {
> -  counts_entry_t *entry = of;
> +  counts_entry_t *const entry = (counts_entry_t *) of;
>
>   free (entry->counts);
>   free (entry);
> @@ -343,7 +343,7 @@ get_coverage_counts (unsigned counter, u
>
>   elt.ident = current_function_funcdef_no + 1;
>   elt.ctr = counter;
> -  entry = htab_find (counts_hash, &elt);
> +  entry = (counts_entry_t *) htab_find (counts_hash, &elt);
>   if (!entry)
>     {
>       warning (0, "no coverage for function %qs found", IDENTIFIER_POINTER
> diff -rup orig/egcc-SVN20080624/gcc/cselib.c egcc-SVN20080624/gcc/cselib.c
> --- orig/egcc-SVN20080624/gcc/cselib.c  2008-06-18 02:02:26.000000000 +0200
> +++ egcc-SVN20080624/gcc/cselib.c       2008-06-25 02:19:03.000000000 +0200
> @@ -142,7 +142,7 @@ static inline struct elt_list *
>  new_elt_list (struct elt_list *next, cselib_val *elt)
>  {
>   struct elt_list *el;
> -  el = pool_alloc (elt_list_pool);
> +  el = (struct elt_list *) pool_alloc (elt_list_pool);
>   el->next = next;
>   el->elt = elt;
>   return el;
> @@ -155,7 +155,7 @@ static inline struct elt_loc_list *
>  new_elt_loc_list (struct elt_loc_list *next, rtx loc)
>  {
>   struct elt_loc_list *el;
> -  el = pool_alloc (elt_loc_list_pool);
> +  el = (struct elt_loc_list *) pool_alloc (elt_loc_list_pool);
>   el->next = next;
>   el->loc = loc;
>   el->setting_insn = cselib_current_insn;
> @@ -232,7 +232,7 @@ entry_and_rtx_equal_p (const void *entry
>  {
>   struct elt_loc_list *l;
>   const cselib_val *const v = (const cselib_val *) entry;
> -  rtx x = (rtx) x_arg;
> +  rtx x = CONST_CAST_RTX ((const_rtx)x_arg);
>   enum machine_mode mode = GET_MODE (x);
>
>   gcc_assert (GET_CODE (x) != CONST_INT && GET_CODE (x) != CONST_FIXED
> @@ -749,7 +749,7 @@ cselib_hash_rtx (rtx x, int create)
>  static inline cselib_val *
>  new_cselib_val (unsigned int value, enum machine_mode mode)
>  {
> -  cselib_val *e = pool_alloc (cselib_val_pool);
> +  cselib_val *e = (cselib_val *) pool_alloc (cselib_val_pool);
>
>   gcc_assert (value);
>
> @@ -759,7 +759,7 @@ new_cselib_val (unsigned int value, enum
>      precisely when we can have VALUE RTXen (when cselib is active)
>      so we don't need to put them in garbage collected memory.
>      ??? Why should a VALUE be an RTX in the first place?  */
> -  e->val_rtx = pool_alloc (value_pool);
> +  e->val_rtx = (rtx) pool_alloc (value_pool);
>   memset (e->val_rtx, 0, RTX_HDR_SIZE);
>   PUT_CODE (e->val_rtx, VALUE);
>   PUT_MODE (e->val_rtx, mode);
> diff -rup orig/egcc-SVN20080624/gcc/dbgcnt.c egcc-SVN20080624/gcc/dbgcnt.c
> --- orig/egcc-SVN20080624/gcc/dbgcnt.c  2008-04-22 02:01:47.000000000 +0200
> +++ egcc-SVN20080624/gcc/dbgcnt.c       2008-06-25 02:17:17.000000000 +0200
> @@ -129,7 +129,7 @@ dbg_cnt_process_opt (const char *arg)
>
>    if (next == NULL || *next != 0)
>      {
> -       char *buffer = alloca (arg - start + 2);
> +       char *buffer = XALLOCAVEC (char, arg - start + 2);
>        sprintf (buffer, "%*c", (int)(1 + (arg - start)), '^');
>        error ("Can not find a valid counter:value pair:");
>        error ("-fdbg-cnt=%s", start);
> diff -rup orig/egcc-SVN20080624/gcc/dbxout.c egcc-SVN20080624/gcc/dbxout.c
> --- orig/egcc-SVN20080624/gcc/dbxout.c  2008-06-07 02:02:46.000000000 +0200
> +++ egcc-SVN20080624/gcc/dbxout.c       2008-06-25 02:16:38.000000000 +0200
> @@ -996,7 +996,7 @@ dbxout_init (const char *input_file_name
>   const char *mapped_name;
>
>   typevec_len = 100;
> -  typevec = ggc_calloc (typevec_len, sizeof typevec[0]);
> +  typevec = GGC_CNEWVEC (struct typeinfo, typevec_len);
>
>   /* stabstr_ob contains one string, which will be just fine with
>      1-byte alignment.  */
> @@ -1709,8 +1709,7 @@ dbxout_type (tree type, int full)
>
>       if (next_type_number == typevec_len)
>        {
> -         typevec
> -           = ggc_realloc (typevec, (typevec_len * 2 * sizeof typevec[0]));
> +         typevec = GGC_RESIZEVEC (struct typeinfo, typevec, typevec_len * 2);
>          memset (typevec + typevec_len, 0, typevec_len * sizeof typevec[0]);
>          typevec_len *= 2;
>        }
> @@ -2404,8 +2403,8 @@ dbxout_expand_expr (tree expr)
>  static int
>  output_used_types_helper (void **slot, void *data)
>  {
> -  tree type = *slot;
> -  VEC(tree, heap) **types_p = data;
> +  tree type = (tree) *slot;
> +  VEC(tree, heap) **types_p = (VEC(tree, heap) **) data;
>
>   if ((TREE_CODE (type) == RECORD_TYPE
>        || TREE_CODE (type) == UNION_TYPE
> diff -rup orig/egcc-SVN20080624/gcc/df-core.c egcc-SVN20080624/gcc/df-core.c
> --- orig/egcc-SVN20080624/gcc/df-core.c 2008-06-19 02:02:18.000000000 +0200
> +++ egcc-SVN20080624/gcc/df-core.c      2008-06-25 02:13:16.000000000 +0200
> @@ -1455,7 +1455,7 @@ df_compact_blocks (void)
>   void **problem_temps;
>   int size = last_basic_block * sizeof (void *);
>   bitmap tmp = BITMAP_ALLOC (&df_bitmap_obstack);
> -  problem_temps = xmalloc (size);
> +  problem_temps = XNEWVAR (void *, size);
>
>   for (p = 0; p < df->num_problems_defined; p++)
>     {
> diff -rup orig/egcc-SVN20080624/gcc/df-problems.c egcc-SVN20080624/gcc/df-problems.c
> --- orig/egcc-SVN20080624/gcc/df-problems.c     2008-06-19 02:02:19.000000000 +0200
> +++ egcc-SVN20080624/gcc/df-problems.c  2008-06-25 02:12:36.000000000 +0200
> @@ -109,8 +109,7 @@ df_grow_bb_info (struct dataflow *dflow)
>   if (dflow->block_info_size < new_size)
>     {
>       new_size += new_size / 4;
> -      dflow->block_info = xrealloc (dflow->block_info,
> -                                   new_size *sizeof (void*));
> +      dflow->block_info = XRESIZEVEC (void *, dflow->block_info, new_size);
>       memset (dflow->block_info + dflow->block_info_size, 0,
>              (new_size - dflow->block_info_size) *sizeof (void *));
>       dflow->block_info_size = new_size;
> @@ -1862,7 +1861,7 @@ struct df_link *
>  df_chain_create (struct df_ref *src, struct df_ref *dst)
>  {
>   struct df_link *head = DF_REF_CHAIN (src);
> -  struct df_link *link = pool_alloc (df_chain->block_pool);
> +  struct df_link *link = (struct df_link *) pool_alloc (df_chain->block_pool);
>
>   DF_REF_CHAIN (src) = link;
>   link->next = head;
> diff -rup orig/egcc-SVN20080624/gcc/df-scan.c egcc-SVN20080624/gcc/df-scan.c
> --- orig/egcc-SVN20080624/gcc/df-scan.c 2008-06-19 02:02:18.000000000 +0200
> +++ egcc-SVN20080624/gcc/df-scan.c      2008-06-25 02:11:36.000000000 +0200
> @@ -477,20 +477,14 @@ df_grow_reg_info (void)
>   if (df->regs_size < new_size)
>     {
>       new_size += new_size / 4;
> -      df->def_regs = xrealloc (df->def_regs,
> -                              new_size *sizeof (struct df_reg_info*));
> -      df->use_regs = xrealloc (df->use_regs,
> -                              new_size *sizeof (struct df_reg_info*));
> -      df->eq_use_regs = xrealloc (df->eq_use_regs,
> -                                 new_size *sizeof (struct df_reg_info*));
> -      df->def_info.begin = xrealloc (df->def_info.begin,
> -                                     new_size *sizeof (int));
> -      df->def_info.count = xrealloc (df->def_info.count,
> -                                     new_size *sizeof (int));
> -      df->use_info.begin = xrealloc (df->use_info.begin,
> -                                     new_size *sizeof (int));
> -      df->use_info.count = xrealloc (df->use_info.count,
> -                                     new_size *sizeof (int));
> +      df->def_regs = XRESIZEVEC (struct df_reg_info *, df->def_regs, new_size);
> +      df->use_regs = XRESIZEVEC (struct df_reg_info *, df->use_regs, new_size);
> +      df->eq_use_regs = XRESIZEVEC (struct df_reg_info *, df->eq_use_regs,
> +                                   new_size);
> +      df->def_info.begin = XRESIZEVEC (unsigned, df->def_info.begin, new_size);
> +      df->def_info.count = XRESIZEVEC (unsigned, df->def_info.count, new_size);
> +      df->use_info.begin = XRESIZEVEC (unsigned, df->use_info.begin, new_size);
> +      df->use_info.count = XRESIZEVEC (unsigned, df->use_info.count, new_size);
>       df->regs_size = new_size;
>     }
>
> @@ -498,13 +492,13 @@ df_grow_reg_info (void)
>     {
>       struct df_reg_info *reg_info;
>
> -      reg_info = pool_alloc (problem_data->reg_pool);
> +      reg_info = (struct df_reg_info *) pool_alloc (problem_data->reg_pool);
>       memset (reg_info, 0, sizeof (struct df_reg_info));
>       df->def_regs[i] = reg_info;
> -      reg_info = pool_alloc (problem_data->reg_pool);
> +      reg_info = (struct df_reg_info *) pool_alloc (problem_data->reg_pool);
>       memset (reg_info, 0, sizeof (struct df_reg_info));
>       df->use_regs[i] = reg_info;
> -      reg_info = pool_alloc (problem_data->reg_pool);
> +      reg_info = (struct df_reg_info *) pool_alloc (problem_data->reg_pool);
>       memset (reg_info, 0, sizeof (struct df_reg_info));
>       df->eq_use_regs[i] = reg_info;
>       df->def_info.begin[i] = 0;
> @@ -524,8 +518,7 @@ df_grow_ref_info (struct df_ref_info *re
>  {
>   if (ref_info->refs_size < new_size)
>     {
> -      ref_info->refs = xrealloc (ref_info->refs,
> -                                new_size *sizeof (struct df_ref *));
> +      ref_info->refs = XRESIZEVEC (struct df_ref *, ref_info->refs, new_size);
>       memset (ref_info->refs + ref_info->refs_size, 0,
>              (new_size - ref_info->refs_size) *sizeof (struct df_ref *));
>       ref_info->refs_size = new_size;
> @@ -562,8 +555,7 @@ df_grow_insn_info (void)
>   if (DF_INSN_SIZE () < new_size)
>     {
>       new_size += new_size / 4;
> -      df->insns = xrealloc (df->insns,
> -                           new_size *sizeof (struct df_insn_info *));
> +      df->insns = XRESIZEVEC (struct df_insn_info *, df->insns, new_size);
>       memset (df->insns + df->insns_size, 0,
>              (new_size - DF_INSN_SIZE ()) *sizeof (struct df_insn_info *));
>       DF_INSN_SIZE () = new_size;
> @@ -703,7 +695,7 @@ df_ref_create (rtx reg, rtx *loc, rtx in
>   ref_rec = *ref_rec_ptr;
>   if (count)
>     {
> -      ref_rec = xrealloc (ref_rec, (count+2) * sizeof (struct df_ref*));
> +      ref_rec = XRESIZEVEC (struct df_ref *, ref_rec, count+2);
>       *ref_rec_ptr = ref_rec;
>       ref_rec[count] = ref;
>       ref_rec[count+1] = NULL;
> @@ -929,7 +921,7 @@ df_insn_create_insn_record (rtx insn)
>   insn_rec = DF_INSN_INFO_GET (insn);
>   if (!insn_rec)
>     {
> -      insn_rec = pool_alloc (problem_data->insn_pool);
> +      insn_rec = (struct df_insn_info *) pool_alloc (problem_data->insn_pool);
>       DF_INSN_INFO_SET (insn, insn_rec);
>     }
>   memset (insn_rec, 0, sizeof (struct df_insn_info));
> @@ -1101,10 +1093,10 @@ df_insn_rescan (rtx insn)
>   struct df_insn_info *insn_info = NULL;
>   basic_block bb = BLOCK_FOR_INSN (insn);
>   struct df_collection_rec collection_rec;
> -  collection_rec.def_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.eq_use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.mw_vec = alloca (sizeof (struct df_mw_hardreg*) * 100);
> +  collection_rec.def_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.eq_use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.mw_vec = XALLOCAVEC (struct df_mw_hardreg *, 100);
>
>   if ((!df) || (!INSN_P (insn)))
>     return false;
> @@ -2048,8 +2040,8 @@ df_notes_rescan (rtx insn)
>       unsigned int num_deleted;
>
>       memset (&collection_rec, 0, sizeof (struct df_collection_rec));
> -      collection_rec.eq_use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -      collection_rec.mw_vec = alloca (sizeof (struct df_mw_hardreg*) * 1000);
> +      collection_rec.eq_use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +      collection_rec.mw_vec = XALLOCAVEC (struct df_mw_hardreg *, 1000);
>
>       num_deleted = df_mw_hardreg_chain_delete_eq_uses (insn_info);
>       df_ref_chain_delete (insn_info->eq_uses);
> @@ -2199,12 +2191,12 @@ df_ref_compare (const void *r1, const vo
>      at ref1.  */
>   if (DF_REF_FLAGS_IS_SET (ref1, DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
>     {
> -      if (DF_REF_EXTRACT_OFFSET (ref1) != DF_REF_EXTRACT_OFFSET (ref2))
> -       return DF_REF_EXTRACT_OFFSET (ref1) - DF_REF_EXTRACT_OFFSET (ref2);
> -      if (DF_REF_EXTRACT_WIDTH (ref1) != DF_REF_EXTRACT_WIDTH (ref2))
> -       return DF_REF_EXTRACT_WIDTH (ref1) - DF_REF_EXTRACT_WIDTH (ref2);
> -      if (DF_REF_EXTRACT_MODE (ref1) != DF_REF_EXTRACT_MODE (ref2))
> -       return DF_REF_EXTRACT_MODE (ref1) - DF_REF_EXTRACT_MODE (ref2);
> +      if (DF_REF_EXTRACT_OFFSET_CONST (ref1) != DF_REF_EXTRACT_OFFSET_CONST (ref2))
> +       return DF_REF_EXTRACT_OFFSET_CONST (ref1) - DF_REF_EXTRACT_OFFSET_CONST (ref2);
> +      if (DF_REF_EXTRACT_WIDTH_CONST (ref1) != DF_REF_EXTRACT_WIDTH_CONST (ref2))
> +       return DF_REF_EXTRACT_WIDTH_CONST (ref1) - DF_REF_EXTRACT_WIDTH_CONST (ref2);
> +      if (DF_REF_EXTRACT_MODE_CONST (ref1) != DF_REF_EXTRACT_MODE_CONST (ref2))
> +       return DF_REF_EXTRACT_MODE_CONST (ref1) - DF_REF_EXTRACT_MODE_CONST (ref2);
>     }
>   return 0;
>  }
> @@ -2604,13 +2596,13 @@ df_ref_create_structure (struct df_colle
>
>   if (ref_flags & (DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
>     {
> -      this_ref = pool_alloc (problem_data->ref_extract_pool);
> +      this_ref = (struct df_ref *) pool_alloc (problem_data->ref_extract_pool);
>       DF_REF_EXTRACT_WIDTH (this_ref) = width;
>       DF_REF_EXTRACT_OFFSET (this_ref) = offset;
>       DF_REF_EXTRACT_MODE (this_ref) = mode;
>     }
>   else
> -    this_ref = pool_alloc (problem_data->ref_pool);
> +    this_ref = (struct df_ref *) pool_alloc (problem_data->ref_pool);
>   DF_REF_ID (this_ref) = -1;
>   DF_REF_REG (this_ref) = reg;
>   DF_REF_REGNO (this_ref) =  regno;
> @@ -2709,7 +2701,7 @@ df_ref_record (struct df_collection_rec
>            ref_flags |= DF_REF_PARTIAL;
>          ref_flags |= DF_REF_MW_HARDREG;
>
> -         hardreg = pool_alloc (problem_data->mw_reg_pool);
> +         hardreg = (struct df_mw_hardreg *) pool_alloc (problem_data->mw_reg_pool);
>          hardreg->type = ref_type;
>          hardreg->flags = ref_flags;
>          hardreg->mw_reg = reg;
> @@ -3482,10 +3474,10 @@ df_bb_refs_record (int bb_index, bool sc
>   int luid = 0;
>   struct df_scan_bb_info *bb_info;
>   struct df_collection_rec collection_rec;
> -  collection_rec.def_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.eq_use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.mw_vec = alloca (sizeof (struct df_mw_hardreg*) * 100);
> +  collection_rec.def_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.eq_use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.mw_vec = XALLOCAVEC (struct df_mw_hardreg *, 100);
>
>   if (!df)
>     return;
> @@ -3772,7 +3764,7 @@ df_record_entry_block_defs (bitmap entry
>  {
>   struct df_collection_rec collection_rec;
>   memset (&collection_rec, 0, sizeof (struct df_collection_rec));
> -  collection_rec.def_vec = alloca (sizeof (struct df_ref*) * FIRST_PSEUDO_REGISTER);
> +  collection_rec.def_vec = XALLOCAVEC (struct df_ref *, FIRST_PSEUDO_REGISTER);
>
>   df_entry_block_defs_collect (&collection_rec, entry_block_defs);
>
> @@ -3943,7 +3935,7 @@ df_record_exit_block_uses (bitmap exit_b
>  {
>   struct df_collection_rec collection_rec;
>   memset (&collection_rec, 0, sizeof (struct df_collection_rec));
> -  collection_rec.use_vec = alloca (sizeof (struct df_ref*) * FIRST_PSEUDO_REGISTER);
> +  collection_rec.use_vec = XALLOCAVEC (struct df_ref *, FIRST_PSEUDO_REGISTER);
>
>   df_exit_block_uses_collect (&collection_rec, exit_block_uses);
>
> @@ -4317,10 +4309,10 @@ df_bb_verify (basic_block bb)
>   struct df_collection_rec collection_rec;
>
>   memset (&collection_rec, 0, sizeof (struct df_collection_rec));
> -  collection_rec.def_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.eq_use_vec = alloca (sizeof (struct df_ref*) * 1000);
> -  collection_rec.mw_vec = alloca (sizeof (struct df_mw_hardreg*) * 100);
> +  collection_rec.def_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.eq_use_vec = XALLOCAVEC (struct df_ref *, 1000);
> +  collection_rec.mw_vec = XALLOCAVEC (struct df_mw_hardreg *, 100);
>
>   gcc_assert (bb_info);
>
> diff -rup orig/egcc-SVN20080624/gcc/df.h egcc-SVN20080624/gcc/df.h
> --- orig/egcc-SVN20080624/gcc/df.h      2008-06-19 02:02:19.000000000 +0200
> +++ egcc-SVN20080624/gcc/df.h   2008-06-25 02:08:11.000000000 +0200
> @@ -637,8 +637,11 @@ struct df
>  /* The following two macros may only be applied if one of
>    DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT is true. */
>  #define DF_REF_EXTRACT_WIDTH(REF) (((struct df_ref_extract *)(REF))->width)
> +#define DF_REF_EXTRACT_WIDTH_CONST(REF) (((const struct df_ref_extract *)(REF))->width)
>  #define DF_REF_EXTRACT_OFFSET(REF) (((struct df_ref_extract *)(REF))->offset)
> +#define DF_REF_EXTRACT_OFFSET_CONST(REF) (((const struct df_ref_extract *)(REF))->offset)
>  #define DF_REF_EXTRACT_MODE(REF) (((struct df_ref_extract *)(REF))->mode)
> +#define DF_REF_EXTRACT_MODE_CONST(REF) (((const struct df_ref_extract *)(REF))->mode)
>  /* Macros to determine the reference type.  */
>
>  #define DF_REF_REG_DEF_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_DEF)
> diff -rup orig/egcc-SVN20080624/gcc/dominance.c egcc-SVN20080624/gcc/dominance.c
> --- orig/egcc-SVN20080624/gcc/dominance.c       2008-06-07 02:02:46.000000000 +0200
> +++ egcc-SVN20080624/gcc/dominance.c    2008-06-25 01:53:48.000000000 +0200
> @@ -706,7 +706,7 @@ get_immediate_dominator (enum cdi_direct
>   if (!node->father)
>     return NULL;
>
> -  return node->father->data;
> +  return (basic_block) node->father->data;
>  }
>
>  /* Set the immediate dominator of the block possibly removing
> @@ -749,9 +749,9 @@ get_dominated_by (enum cdi_direction dir
>   if (!son)
>     return NULL;
>
> -  VEC_safe_push (basic_block, heap, bbs, son->data);
> +  VEC_safe_push (basic_block, heap, bbs, (basic_block) son->data);
>   for (ason = son->right, n = 1; ason != son; ason = ason->right)
> -    VEC_safe_push (basic_block, heap, bbs, ason->data);
> +    VEC_safe_push (basic_block, heap, bbs, (basic_block) ason->data);
>
>   return bbs;
>  }
> @@ -823,7 +823,7 @@ nearest_common_dominator (enum cdi_direc
>   if (!bb2)
>     return bb1;
>
> -  return et_nca (bb1->dom[dir_index], bb2->dom[dir_index])->data;
> +  return (basic_block) et_nca (bb1->dom[dir_index], bb2->dom[dir_index])->data;
>  }
>
>
> @@ -1103,7 +1103,7 @@ succeed:
>  static basic_block
>  root_of_dom_tree (enum cdi_direction dir, basic_block bb)
>  {
> -  return et_root (bb->dom[dom_convert_dir_to_idx (dir)])->data;
> +  return (basic_block) et_root (bb->dom[dom_convert_dir_to_idx (dir)])->data;
>  }
>
>  /* See the comment in iterate_fix_dominators.  Finds the immediate dominators
> @@ -1313,10 +1313,10 @@ iterate_fix_dominators (enum cdi_directi
>          dom_i = (size_t) *pointer_map_contains (map, dom);
>
>          /* Do not include parallel edges to G.  */
> -         if (bitmap_bit_p (g->vertices[dom_i].data, i))
> +         if (bitmap_bit_p ((bitmap) g->vertices[dom_i].data, i))
>            continue;
>
> -         bitmap_set_bit (g->vertices[dom_i].data, i);
> +         bitmap_set_bit ((bitmap) g->vertices[dom_i].data, i);
>          add_edge (g, dom_i, i);
>        }
>     }
> @@ -1394,7 +1394,7 @@ first_dom_son (enum cdi_direction dir, b
>   unsigned int dir_index = dom_convert_dir_to_idx (dir);
>   struct et_node *son = bb->dom[dir_index]->son;
>
> -  return son ? son->data : NULL;
> +  return (basic_block) (son ? son->data : NULL);
>  }
>
>  /* Returns the next dominance son after BB in the dominator or postdominator
> @@ -1406,7 +1406,7 @@ next_dom_son (enum cdi_direction dir, ba
>   unsigned int dir_index = dom_convert_dir_to_idx (dir);
>   struct et_node *next = bb->dom[dir_index]->right;
>
> -  return next->father->son == next ? NULL : next->data;
> +  return (basic_block) (next->father->son == next ? NULL : next->data);
>  }
>
>  /* Return dominance availability for dominance info DIR.  */
> diff -rup orig/egcc-SVN20080624/gcc/dse.c egcc-SVN20080624/gcc/dse.c
> --- orig/egcc-SVN20080624/gcc/dse.c     2008-06-07 02:02:46.000000000 +0200
> +++ egcc-SVN20080624/gcc/dse.c  2008-06-25 01:50:05.000000000 +0200
> @@ -592,7 +592,7 @@ clear_alias_set_lookup (alias_set_type a
>   slot = htab_find_slot (clear_alias_mode_table, &tmp_holder, NO_INSERT);
>   gcc_assert (*slot);
>
> -  return *slot;
> +  return (struct clear_alias_mode_holder *) *slot;
>  }
>
>
> @@ -638,7 +638,8 @@ get_group_info (rtx base)
>     {
>       if (!clear_alias_group)
>        {
> -         clear_alias_group = gi = pool_alloc (rtx_group_info_pool);
> +         clear_alias_group = gi =
> +           (group_info_t) pool_alloc (rtx_group_info_pool);
>          memset (gi, 0, sizeof (struct group_info));
>          gi->id = rtx_group_next_id++;
>          gi->store1_n = BITMAP_ALLOC (NULL);
> @@ -658,7 +659,7 @@ get_group_info (rtx base)
>
>   if (gi == NULL)
>     {
> -      *slot = gi = pool_alloc (rtx_group_info_pool);
> +      *slot = gi = (group_info_t) pool_alloc (rtx_group_info_pool);
>       gi->rtx_base = base;
>       gi->id = rtx_group_next_id++;
>       gi->base_mem = gen_rtx_MEM (QImode, base);
> @@ -1246,7 +1247,7 @@ record_store (rtx body, bb_info_t bb_inf
>       if (clear_alias_group->offset_map_size_p < spill_alias_set)
>        clear_alias_group->offset_map_size_p = spill_alias_set;
>
> -      store_info = pool_alloc (rtx_store_info_pool);
> +      store_info = (store_info_t) pool_alloc (rtx_store_info_pool);
>
>       if (dump_file)
>        fprintf (dump_file, " processing spill store %d(%s)\n",
> @@ -1260,7 +1261,7 @@ record_store (rtx body, bb_info_t bb_inf
>       group_info_t group
>        = VEC_index (group_info_t, rtx_group_vec, group_id);
>
> -      store_info = pool_alloc (rtx_store_info_pool);
> +      store_info = (store_info_t) pool_alloc (rtx_store_info_pool);
>       set_usage_bits (group, offset, width);
>
>       if (dump_file)
> @@ -1277,7 +1278,7 @@ record_store (rtx body, bb_info_t bb_inf
>        insn_info->stack_pointer_based = true;
>       insn_info->contains_cselib_groups = true;
>
> -      store_info = pool_alloc (cse_store_info_pool);
> +      store_info = (store_info_t) pool_alloc (cse_store_info_pool);
>       group_id = -1;
>
>       if (dump_file)
> @@ -1603,7 +1604,8 @@ replace_read (store_info_t store_info, i
>
>   if (validate_change (read_insn->insn, loc, read_reg, 0))
>     {
> -      deferred_change_t deferred_change = pool_alloc (deferred_change_pool);
> +      deferred_change_t deferred_change =
> +       (deferred_change_t) pool_alloc (deferred_change_pool);
>
>       /* Insert this right before the store insn where it will be safe
>         from later insns that might change it before the read.  */
> @@ -1713,7 +1715,7 @@ check_mem_read_rtx (rtx *loc, void *data
>   else
>     width = GET_MODE_SIZE (GET_MODE (mem));
>
> -  read_info = pool_alloc (read_info_pool);
> +  read_info = (read_info_t) pool_alloc (read_info_pool);
>   read_info->group_id = group_id;
>   read_info->mem = mem;
>   read_info->alias_set = spill_alias_set;
> @@ -1933,7 +1935,7 @@ static void
>  scan_insn (bb_info_t bb_info, rtx insn)
>  {
>   rtx body;
> -  insn_info_t insn_info = pool_alloc (insn_info_pool);
> +  insn_info_t insn_info = (insn_info_t) pool_alloc (insn_info_pool);
>   int mems_found = 0;
>   memset (insn_info, 0, sizeof (struct insn_info));
>
> @@ -2124,7 +2126,7 @@ dse_step1 (void)
>   FOR_ALL_BB (bb)
>     {
>       insn_info_t ptr;
> -      bb_info_t bb_info = pool_alloc (bb_info_pool);
> +      bb_info_t bb_info = (bb_info_t) pool_alloc (bb_info_pool);
>
>       memset (bb_info, 0, sizeof (struct bb_info));
>       bitmap_set_bit (all_blocks, bb->index);
> @@ -2425,7 +2427,8 @@ dse_record_singleton_alias_set (alias_se
>   slot = htab_find_slot (clear_alias_mode_table, &tmp_holder, INSERT);
>   gcc_assert (*slot == NULL);
>
> -  *slot = entry = pool_alloc (clear_alias_mode_pool);
> +  *slot = entry =
> +    (struct clear_alias_mode_holder *) pool_alloc (clear_alias_mode_pool);
>   entry->alias_set = alias_set;
>   entry->mode = mode;
>  }
> diff -rup orig/egcc-SVN20080624/gcc/dwarf2asm.c egcc-SVN20080624/gcc/dwarf2asm.c
> --- orig/egcc-SVN20080624/gcc/dwarf2asm.c       2008-05-17 02:02:21.000000000 +0200
> +++ egcc-SVN20080624/gcc/dwarf2asm.c    2008-06-25 01:46:49.000000000 +0200
> @@ -757,7 +757,7 @@ dw2_force_const_mem (rtx x, bool public)
>
>       if (public && USE_LINKONCE_INDIRECT)
>        {
> -         char *ref_name = alloca (strlen (str) + sizeof "DW.ref.");
> +         char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref.");
>
>          sprintf (ref_name, "DW.ref.%s", str);
>          id = get_identifier (ref_name);
>


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