ipa-struct-reorg.c (replace_field_acc): Make it clear to the compiler that wr.wrap...
authorSamuel Tardieu <sam@rfc1149.net>
Wed, 24 Oct 2007 21:49:27 +0000 (21:49 +0000)
committerOlga Golovanevsky <olga@gcc.gnu.org>
Wed, 24 Oct 2007 21:49:27 +0000 (21:49 +0000)
2007-10-24  Samuel Tardieu  <sam@rfc1149.net>
            Olga Golovanevsky <olga@il.ibm.com>

* ipa-struct-reorg.c (replace_field_acc): Make it clear to
the compiler that wr.wrap and wr.domain are initialized in
any case.

2007-10-24  Samuel Tardieu  <sam@rfc1149.net>

* ipa-struct-reorg.c (sum_counts): Use HOST_WIDEST_PRINT_DEC
to print gcov_type values.

Co-Authored-By: Olga Golovanevsky <olga@il.ibm.com>
From-SVN: r129615

gcc/ChangeLog
gcc/ipa-struct-reorg.c

index bfbf0639e08d9bb14f953b5b7ca26dca60a9b2ef..154b72cbd3b4a8e0b91da501231b9bb65915aad3 100644 (file)
@@ -1,3 +1,15 @@
+2007-10-24  Samuel Tardieu  <sam@rfc1149.net>
+            Olga Golovanevsky <olga@il.ibm.com>
+       
+       * ipa-struct-reorg.c (replace_field_acc): Make it clear to
+       the compiler that wr.wrap and wr.domain are initialized in
+       any case.
+
+2007-10-24  Samuel Tardieu  <sam@rfc1149.net>
+
+       * ipa-struct-reorg.c (sum_counts): Use HOST_WIDEST_PRINT_DEC
+       to print gcov_type values.
+
 2007-10-24  Eric B. Weddington  <eweddington@cso.atmel.com>
 
        * config/avr/avr.h: Do not include progmem_section definition when
index 9a04289f22444ffb6e90b40a623764e4f513a702..e4bc7faf292b76dba23eb098bca84567d6e22a2f 100644 (file)
@@ -957,18 +957,19 @@ replace_field_acc (struct field_access_site *acc, tree new_type)
   tree new_acc;
   tree field_id = DECL_NAME (acc->field_decl);
   VEC (type_wrapper_t, heap) *wrapper = VEC_alloc (type_wrapper_t, heap, 10);
-  type_wrapper_t wr;
   type_wrapper_t *wr_p = NULL;
   
   while (TREE_CODE (ref_var) == INDIRECT_REF
         || TREE_CODE (ref_var) == ARRAY_REF)
     {
+      type_wrapper_t wr;
+
       if ( TREE_CODE (ref_var) == INDIRECT_REF)
        {
          wr.wrap = 0;
          wr.domain = 0;
        }
-      else if (TREE_CODE (ref_var) == ARRAY_REF)
+      else
        {
          wr.wrap = 1;
          wr.domain = TREE_OPERAND (ref_var, 1);
@@ -3550,7 +3551,7 @@ sum_counts (d_str str, gcov_type *hotest)
        {
          fprintf (dump_file, "\nCounter of field \"");
          print_generic_expr (dump_file, str->fields[i].decl, 0);
-         fprintf (dump_file, "\" is " HOST_WIDE_INT_PRINT_DEC, 
+         fprintf (dump_file, "\" is " HOST_WIDEST_INT_PRINT_DEC, 
                   str->fields[i].count);
        }
       str->count += str->fields[i].count;
@@ -3560,7 +3561,7 @@ sum_counts (d_str str, gcov_type *hotest)
     {
       fprintf (dump_file, "\nCounter of struct \"");
       print_generic_expr (dump_file, str->decl, 0);
-      fprintf (dump_file, "\" is " HOST_WIDE_INT_PRINT_DEC, str->count);
+      fprintf (dump_file, "\" is " HOST_WIDEST_INT_PRINT_DEC, str->count);
     }
 
   if (str->count > *hotest)