aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-01-31 14:40:24 +0100
committerRichard Biener <rguenther@suse.de>2024-01-31 15:18:45 +0100
commit22dbfbe8767ff4c1d93e39f68ec7c2d5b1358beb (patch)
tree6bd4ba1407002d4cbf9f3c296e675a289ef74c07 /gcc/c/c-decl.cc
parent0529ba8168c89f24314e8750237d77bb132bea9c (diff)
downloadgcc-22dbfbe8767ff4c1d93e39f68ec7c2d5b1358beb.zip
gcc-22dbfbe8767ff4c1d93e39f68ec7c2d5b1358beb.tar.gz
gcc-22dbfbe8767ff4c1d93e39f68ec7c2d5b1358beb.tar.bz2
middle-end/110176 - wrong zext (bool) <= (int) 4294967295u folding
The following fixes a wrong pattern that didn't match the behavior of the original fold_widened_comparison in that get_unwidened returned a constant always in the wider type. But here we're using (int) 4294967295u without the conversion applied. Fixed by doing as earlier in the pattern - matching constants only if the conversion was actually applied. PR middle-end/110176 * match.pd (zext (bool) <= (int) 4294967295u): Make sure to match INTEGER_CST only without outstanding conversion. * gcc.dg/torture/pr110176.c: New testcase.
Diffstat (limited to 'gcc/c/c-decl.cc')
0 files changed, 0 insertions, 0 deletions