OSDN Git Service

2008-04-30 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa.c
index 5a67aa8..f7306b1 100644 (file)
@@ -1117,12 +1117,8 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
              != get_alias_set (TREE_TYPE (outer_type))))
        return false;
 
-      /* Do not lose casts from const qualified to non-const
-        qualified.  */
-      if ((TYPE_READONLY (TREE_TYPE (outer_type))
-          != TYPE_READONLY (TREE_TYPE (inner_type)))
-         && TYPE_READONLY (TREE_TYPE (inner_type)))
-       return false;
+      /* We do not care for const qualification of the pointed-to types
+        as const qualification has no semantic value to the middle-end.  */
 
       /* Do not lose casts to restrict qualified pointers.  */
       if ((TYPE_RESTRICT (outer_type)
@@ -1530,8 +1526,10 @@ gate_warn_uninitialized (void)
   return warn_uninitialized != 0;
 }
 
-struct tree_opt_pass pass_early_warn_uninitialized =
+struct gimple_opt_pass pass_early_warn_uninitialized =
 {
+ {
+  GIMPLE_PASS,
   NULL,                                        /* name */
   gate_warn_uninitialized,             /* gate */
   execute_early_warn_uninitialized,    /* execute */
@@ -1543,12 +1541,14 @@ struct tree_opt_pass pass_early_warn_uninitialized =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0,                                    /* todo_flags_finish */
-  0                                    /* letter */
+  0                                     /* todo_flags_finish */
+ }
 };
 
-struct tree_opt_pass pass_late_warn_uninitialized =
+struct gimple_opt_pass pass_late_warn_uninitialized =
 {
+ {
+  GIMPLE_PASS,
   NULL,                                        /* name */
   gate_warn_uninitialized,             /* gate */
   execute_late_warn_uninitialized,     /* execute */
@@ -1560,8 +1560,8 @@ struct tree_opt_pass pass_late_warn_uninitialized =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0,                                    /* todo_flags_finish */
-  0                                    /* letter */
+  0                                     /* todo_flags_finish */
+ }
 };
 
 /* Compute TREE_ADDRESSABLE for local variables.  */
@@ -1643,8 +1643,10 @@ execute_update_addresses_taken (void)
   return 0;
 }
 
-struct tree_opt_pass pass_update_address_taken =
+struct gimple_opt_pass pass_update_address_taken =
 {
+ {
+  GIMPLE_PASS,
   "addressables",                      /* name */
   NULL,                                        /* gate */
   execute_update_addresses_taken,      /* execute */
@@ -1656,6 +1658,6 @@ struct tree_opt_pass pass_update_address_taken =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_update_ssa,                      /* todo_flags_finish */
-  0                                    /* letter */
+  TODO_update_ssa                       /* todo_flags_finish */
+ }
 };