middle-end/104402 - split out _Complex compares from COND_EXPRs
authorRichard Biener <rguenther@suse.de>
Mon, 7 Feb 2022 08:31:07 +0000 (09:31 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 7 Feb 2022 08:37:59 +0000 (09:37 +0100)
commit70430001b74d0f67386a6b3642c857b3389cd5d0
tree29c05d2c608dd767b103751694248e4d21d8682b
parente66ba0f55c000152df63fc67c11a64f79122ef86
middle-end/104402 - split out _Complex compares from COND_EXPRs

This makes sure we always have a _Complex compare split to a
different stmt for the compare operand in a COND_EXPR on GIMPLE.
Complex lowering doesn't handle this and the change is something
we want for all kind of compares at some point.

2022-02-07  Richard Biener  <rguenther@suse.de>

PR middle-end/104402
* gimple-expr.cc (is_gimple_condexpr): _Complex typed
compares are not valid.
* tree-cfg.cc (verify_gimple_assign_ternary): For COND_EXPR
check is_gimple_condexpr.

* gcc.dg/torture/pr104402.c: New testcase.
gcc/gimple-expr.cc
gcc/testsuite/gcc.dg/torture/pr104402.c [new file with mode: 0644]
gcc/tree-cfg.cc