From 33ae72a3c73f6219be86715e8da71ed345f6077c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 14 Aug 2026 23:14:38 +0200 Subject: Map Int and Word to hardware word sizes --- gcc/gcc/elna-diagnostic.cc | 2 +- gcc/gcc/elna-generic.cc | 7 ++++++- gcc/gcc/elna-tree.cc | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/gcc/elna-diagnostic.cc b/gcc/gcc/elna-diagnostic.cc index 3bc274e..ea1f64c 100644 --- a/gcc/gcc/elna-diagnostic.cc +++ b/gcc/gcc/elna-diagnostic.cc @@ -63,7 +63,7 @@ namespace elna::gcc return make_location(caret, start, end); } - void report_errors(const std::deque>& errors) + void report_errors(const std::deque>& errors) { for (const auto& error : errors) { diff --git a/gcc/gcc/elna-generic.cc b/gcc/gcc/elna-generic.cc index aff5d9d..5230196 100644 --- a/gcc/gcc/elna-generic.cc +++ b/gcc/gcc/elna-generic.cc @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "function.h" #include "cgraph.h" #include "gimplify.h" +#include "dumpfile.h" #include "stringpool.h" #include "realmpfr.h" #include "fold-const.h" @@ -475,6 +476,8 @@ namespace elna::gcc DECL_PRESERVE_P(fndecl) = 1; + dump_function(TDI_original, fndecl); + pop_cfun(); gimplify_function_tree(fndecl); cgraph_node::finalize_function(fndecl, true); @@ -482,7 +485,9 @@ namespace elna::gcc void generic_visitor::visit(boot::literal *literal) { - this->current_expression = constant_to_tree(boot::constant_value{ literal->value }, this->symbols); + tree literal_type = get_inner_alias(literal->type_decoration, this->symbols); + this->current_expression = constant_to_tree(boot::constant_value{ literal->value }, + this->symbols, literal_type); } void generic_visitor::visit(boot::literal *literal) diff --git a/gcc/gcc/elna-tree.cc b/gcc/gcc/elna-tree.cc index 688fc4a..255cf60 100644 --- a/gcc/gcc/elna-tree.cc +++ b/gcc/gcc/elna-tree.cc @@ -259,7 +259,7 @@ namespace elna::gcc { if (auto converted = literal_value.try_to()) { - return build_int_cst(elna_int_type_node, *converted); + return build_int_cst(type, *converted); } return NULL_TREE; } @@ -267,7 +267,7 @@ namespace elna::gcc { if (auto converted = literal_value.try_to()) { - return build_int_cstu(elna_word_type_node, *converted); + return build_int_cstu(type, *converted); } return NULL_TREE; } -- cgit v1.2.3