aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-06 08:58:18 +0100
committerRichard Biener <rguenther@suse.de>2023-11-06 09:55:27 +0100
commitd803438e0c4016aff720fad418377c5b13567063 (patch)
treedb7dacb71da4e2456017c0b1b0adbbd0a6e7f8c2 /gcc/tree.cc
parent3f9ff6e81b2554ed87131b3c6d25cf72130fbbfc (diff)
downloadgcc-d803438e0c4016aff720fad418377c5b13567063.zip
gcc-d803438e0c4016aff720fad418377c5b13567063.tar.gz
gcc-d803438e0c4016aff720fad418377c5b13567063.tar.bz2
tree-optimization/112369 - strip_float_extensions and vectors
The following fixes an error in strip_float_extensions when facing vector conversions. PR tree-optimization/112369 * tree.cc (strip_float_extensions): Use element_precision. * gcc.dg/pr112369.c: New testcase.
Diffstat (limited to 'gcc/tree.cc')
-rw-r--r--gcc/tree.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree.cc b/gcc/tree.cc
index cfead15..9c9b057 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -12138,7 +12138,7 @@ strip_float_extensions (tree exp)
if (DECIMAL_FLOAT_TYPE_P (expt) != DECIMAL_FLOAT_TYPE_P (subt))
return exp;
- if (TYPE_PRECISION (subt) > TYPE_PRECISION (expt))
+ if (element_precision (subt) > element_precision (expt))
return exp;
return strip_float_extensions (sub);