[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression power_4
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 15:03:35 GMT 2025
https://gcc.gnu.org/g:4bca2a51f2232642a130df73c3e805571ca395a1
commit 4bca2a51f2232642a130df73c3e805571ca395a1
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Fri May 9 13:29:56 2025 +0200
Correction régression power_4
Diff:
---
gcc/tree.cc | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/gcc/tree.cc b/gcc/tree.cc
index fa5df47e8111..c8b8b3edd35a 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -13046,17 +13046,7 @@ array_ref_up_bound (tree exp)
/* If there is a domain type and it has an upper bound, use it, substituting
for a PLACEHOLDER_EXPR as needed. */
if (domain_type && TYPE_MAX_VALUE (domain_type))
- {
- tree val = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TYPE_MAX_VALUE (domain_type), exp);
- if (TREE_OPERAND (exp, 2))
- return fold_build2_loc (EXPR_LOCATION (exp), PLUS_EXPR,
- TREE_TYPE (val), val,
- fold_convert_loc (EXPR_LOCATION (exp),
- TREE_TYPE (val),
- TREE_OPERAND (exp, 2)));
- else
- return val;
- }
+ return SUBSTITUTE_PLACEHOLDER_IN_EXPR (TYPE_MAX_VALUE (domain_type), exp);
/* Otherwise fail. */
return NULL_TREE;
More information about the Gcc-cvs
mailing list