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]

unbreak replace_exp_1


Post:

2009-05-26  Richard Guenther  <rguenther@suse.de>

        * tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove
        redundant calls to merge_alias_info.
        (bump_vector_ptr): Likewise.
        * tree-ssa-copy.c (merge_alias_info): Remove.
        (replace_exp_1): Remove call to merge_alias_info.

There is a unused warning for the variable op in replace_exp_1 when
configuring with --enable-checking=release. When bootstrapping with
warnings as errors, this breaks the build.

The fix seems obvious, as attached.

tested x86_64/linux

-benjamin

2009-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* tree-ssa-copy.c (replace_exp_1): Move op for warning-free use
	with checking disabled.

Index: gcc/tree-ssa-copy.c
===================================================================
--- gcc/tree-ssa-copy.c	(revision 147938)
+++ gcc/tree-ssa-copy.c	(working copy)
@@ -160,9 +160,8 @@
 replace_exp_1 (use_operand_p op_p, tree val,
     	       bool for_propagation ATTRIBUTE_UNUSED)
 {
-  tree op = USE_FROM_PTR (op_p);
-
 #if defined ENABLE_CHECKING
+  tree op = USE_FROM_PTR (op_p);
   gcc_assert (!(for_propagation
 		&& TREE_CODE (op) == SSA_NAME
 		&& TREE_CODE (val) == SSA_NAME

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