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]

Question on cfg_remove_useless_stmts_bb


I'm getting a failure on c-torture/execute/930513-2.c with -O3 and what's
happening is that the out of ssa pass is looking at 

  if (j != i) goto <L1>; else goto <L2>;

    ...

<L2>:;
  i = i + 1;
  j = i;


The cfg_remove_useless_stmts_bb knows that J and I are equal.  So when it
gets to the "j = i" assignment, it deletes it.  The problem is that it
doesn't notice that "i = i + 1" clobbers the equality relation.

I don't think it's sufficient to test for an assignment to VAL here because
I think VAL can be an expression since we are no longer in GIMPLE, but
I'm not sure.

Hence my question.

I don't know why this test isn't failing for everybody, so I suspect this
is some sort of latent bug somehow.  (Or else I'm missing something,
which is quite possible.)


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