]> git.ipfire.org Git - thirdparty/gcc.git/commit
MATCH: Fix invalid signed boolean type usage
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 28 Nov 2023 00:41:25 +0000 (16:41 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 28 Nov 2023 17:49:47 +0000 (09:49 -0800)
commit68ffaf839883253e0f288862ff20b8005c92df4e
tree80d772a05927ffa51ae40aa6f47a6e95d52e93b0
parentb73fa20615105238d081f44660efd400f76af1cf
MATCH: Fix invalid signed boolean type usage

This fixes the incorrect assumption that was done in r14-3721-ge6bcf839894783,
that being able to doing the negative after the conversion would be a valid thing
but really it is not valid for boolean types.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

PR tree-optimization/112738
* match.pd (`(nop_convert)-(convert)a`): Reject
when the outer type is boolean.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/match.pd