This is the mail archive of the gcc@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: RFC: PR 19650


On Fri, 28 Jan 2005, Dale Johannesen wrote:
> On Jan 28, 2005, at 3:44 PM, Dale Johannesen wrote:
> >
> > That seems to solve the bootstrap problem and the original failure.
> > I'll run it through more testing.  Thanks.
>
> And now I get a bootstrap comparison failure <sigh>, I'll track it down.

Can you check if using TREE_OPERAND (t, 0) in both clauses fixes the
problem?

In GCC's tree type system, the operands of binary and comparison
operators are usually the same, so it shouldn't make any difference
if you use the TREE_TYPE of TREE_OPERAND (t,0) or TREE_OPERAND (t,1).
The possible exceptions to the rule are the shift and rotate operators
where it may be permissible for front-ends to use a different type
for the first and second operands, think (long long)x << (char)y.

This then complicates this patch for "(long long)1 << (char)(x != 0)"
and "(long long)(x != 0) << (char)1".


If all else fails, we might ultimately need both arg0_type and
arg1_type to be passed.  In which case, its probably easier to
pass just "t", rather than code=TREE_CODE (t), type=TREE_TYPE(t),
arg0_type=TREE_OPERAND(t,0) and arg1_type=TREE_OPERAND(t,1).

Roger
--


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