https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104402

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |8.1.0
   Last reconfirmed|                            |2022-02-05
   Target Milestone|---                         |9.5
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
      Known to fail|                            |9.1.0
            Summary|ICE on valid code: in       |[9/10/11/12 Regression] ICE
                   |do_jump_1, at dojump.c      |on valid code caused by not
                   |                            |lowering complex int
                   |                            |compare inside a COND_EXPR

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

The problem is obvious complex lowering does not handle COND_EXPR.
In GCC 8.x we had:

  _4 = a.1_3 != __complex__ (0, 0);
  _6 = _4 ? 3 : 2;

While in GCC 9+ we have:
  _5 = a.1_3 != __complex__ (0, 0) ? 3 : 2;

Complex lowering didn't lower the 9+ IR.

Also here is a better testcase:
_Complex int a;
char b;
int main() {}
void c() {
  if (b != 2 + (long)(a != 0 ^ 0))
    __builtin_abort();
}

Reply via email to