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]

[tree-ssa] cfg_remove_useless_stmts and invert_truthval


I just checked out a new branch today, applied the expression
replacement code and tried a build.

Im getting an abort in invert_truthval now building target libiberty
because I have a condition that looks like:


if ((_Bool)iftmp.1182)

Since it's casted, invert_truthval executes this sequence:
    case NOP_EXPR:
    case CONVERT_EXPR:
    case FLOAT_EXPR:
      return build1 (TREE_CODE (arg), type,
                     invert_truthvalue (TREE_OPERAND (arg, 0)));

which calls itself on the 'iftmp.1182' VAR_DECL, which is not of type
boolean, so invert_truthval aborts at the end:
  if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE)
    abort ();

Well of course it isn't boolean, since the cast was removed in the
previous iteration...

This doesnt seem quite right?... Whats the right thing here?  This didnt
happen a couple of days ago, presumably because of the new
remove_useless... code.

Andrew


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