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]

[tree-ssa] Another testcase


I don't know if this will currently fail on tree-ssa, but it certainly
fails in my tree right now when I use operand_equal_p instead of
simple_cst_equal for checking equality of trees.

The underlying problem is operand_equal_p returns false anytime one
of the nodes its given has TREE_SIDE_EFFECTS set.  We unconditionally
set TREE_SIDE_EFFECTS on the toplevel node of a STMT_EXPR.  This
then gets propagated up to that node's parents.

struct tree_decl
{
  unsigned in_system_header_flag:1;
};
union tree_node
{
  struct tree_decl decl;
};
typedef union tree_node *tree;
static int
redeclaration_error_message (olddecl)
     tree olddecl;
{
  if (({olddecl;})->decl.in_system_header_flag)
    ;
}



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