This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][RFC] Replace assignment in gcc_assert with comparison
- From: simonb at google dot com (Simon Baldwin)
- To: gcc-patches at gcc dot gnu dot org
- Cc: dnovillo at google dot com
- Date: Thu, 7 Jun 2007 15:58:28 -0700 (PDT)
- Subject: [PATCH][RFC] Replace assignment in gcc_assert with comparison
Replaced erroneous '=' assignment in gcc_assert() with '==' comparison.
Regression tested on i386 against the full testsuite for default languages.
gcc/ChangeLog
2007-06-07 Simon Baldwin <simonb@google.com>
* tree-flow-inline.h (var_ann): Replaced erroneous '=' assignment
in gcc_assert() with '==' comparison.
diff -Nrcp3 orig/gcc/gcc/tree-flow-inline.h gcc/gcc/tree-flow-inline.h
*** orig/gcc/gcc/tree-flow-inline.h Mon Jun 4 09:49:07 2007
--- gcc/gcc/tree-flow-inline.h Thu Jun 7 13:24:31 2007
*************** var_ann (tree t)
*** 210,216 ****
htab_find_with_hash (gimple_var_anns (cfun), t, DECL_UID (t)));
if (!sann)
return NULL;
! gcc_assert (sann->ann.common.type = VAR_ANN);
return &sann->ann;
}
gcc_assert (!t->base.ann
--- 210,216 ----
htab_find_with_hash (gimple_var_anns (cfun), t, DECL_UID (t)));
if (!sann)
return NULL;
! gcc_assert (sann->ann.common.type == VAR_ANN);
return &sann->ann;
}
gcc_assert (!t->base.ann