diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-06-30 17:50:08 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-07-04 10:19:50 -0700 |
commit | 2e5c1b123d5bc4b7eca91f1eb2dab88d0bcdfcfa (patch) | |
tree | 19a3c4767cd5ddb4a1cb279ee30bbd8f6d539230 /gcc/rust/backend | |
parent | cd22b97726472138d3fe22fb1ff0c27176408fc9 (diff) | |
download | gcc-2e5c1b123d5bc4b7eca91f1eb2dab88d0bcdfcfa.zip gcc-2e5c1b123d5bc4b7eca91f1eb2dab88d0bcdfcfa.tar.gz gcc-2e5c1b123d5bc4b7eca91f1eb2dab88d0bcdfcfa.tar.bz2 |
Fix PR 110487: invalid signed boolean value
This fixes the first part of this bug where `a ? -1 : 0`
would cause a value of 1 into the signed boolean value.
It fixes the problem by casting to an integer type of
the same size/signedness before doing the negative and
then casting to the type of expression.
OK? Bootstrapped and tested on x86_64.
gcc/ChangeLog:
* match.pd (a?-1:0): Cast type an integer type
rather the type before the negative.
(a?0:-1): Likewise.
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions