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]

Re: [PATCH] Fix ACATS failures in GCC 3.4


> Define "strip".  If you mean in the tree, no, it's not: the types of
> the operands of an arithmetic expression must *exactly* match that of
> the expression itself.

OK.  Pretty strong requirement.

> If you mean in setting ARG0 and ARG1, then yes, it's safe to strip them
> because those values aren't supposed to be put back into the tree without
> being converted to the type of the tree.

Then I'm under the impression someone should rewrite fold :-)

Is this valid (fold-const.c:5482) ?

    {
      t = fold (build (code == BIT_AND_EXPR ? TRUTH_AND_EXPR
		       : code == BIT_IOR_EXPR ? TRUTH_OR_EXPR
		       : TRUTH_XOR_EXPR,
		       type, arg0, arg1));

      if (code == EQ_EXPR)
	t = invert_truthvalue (t);

      return t;
  }

-- 
Eric Botcazou


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