aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-10-17 23:50:44 +0200
committerEugen Wissner <belka@caraus.de>2026-10-17 23:50:44 +0200
commit81043b67437445dcf83055098490e04cc88ff7ee (patch)
treec67d2cf6e61f5e379af547083e21b3b76e06aca8 /gcc
parent56a1244380133ab400f98d2da15353e080ffb360 (diff)
downloadelna-81043b67437445dcf83055098490e04cc88ff7ee.tar.gz
Fix slice comparison by contents
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc/elna-generic.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gcc/elna-generic.cc b/gcc/gcc/elna-generic.cc
index 57c8c22..de00642 100644
--- a/gcc/gcc/elna-generic.cc
+++ b/gcc/gcc/elna-generic.cc
@@ -531,8 +531,9 @@ namespace elna::gcc
{
const tree_code combination_code = equality_code == EQ_EXPR
? TRUTH_ANDIF_EXPR : TRUTH_ORIF_EXPR;
+ const boot::type resolved_type = boot::erase_generic(left_type);
- if (left_type.get<boot::slice_type>() != nullptr)
+ if (resolved_type.get<boot::slice_type>() != nullptr)
{
tree lhs_ptr_field = TYPE_FIELDS(TREE_TYPE(left));
tree lhs_length_field = TREE_CHAIN(lhs_ptr_field);
@@ -558,8 +559,8 @@ namespace elna::gcc
return build2(combination_code, elna_bool_type_node, length_equality, equals_zero);
}
- else if (left_type.get<boot::record_type>() != nullptr
- || left_type.get<boot::array_type>() != nullptr)
+ else if (resolved_type.get<boot::record_type>() != nullptr
+ || resolved_type.get<boot::array_type>() != nullptr)
{
tree size = fold_convert(elna_word_type_node,
size_in_bytes(TREE_TYPE(left)));