Mark @ nodes addressable

This commit is contained in:
2025-01-30 23:09:51 +01:00
parent 1b90829299
commit 45898bb95f
5 changed files with 68 additions and 21 deletions

View File

@ -9,6 +9,7 @@
#include "realmpfr.h"
#include "stor-layout.h"
#include "varasm.h"
#include "fold-const.h"
#include <set>
namespace elna
@ -393,9 +394,11 @@ namespace gcc
switch (expression->operation())
{
case source::unary_operator::reference:
this->current_expression = build1_loc(get_location(&expression->position()), ADDR_EXPR,
build_pointer_type_for_mode(TREE_TYPE(this->current_expression), VOIDmode, true),
this->current_expression);
TREE_ADDRESSABLE(this->current_expression) = 1;
this->current_expression = build_fold_addr_expr_with_type_loc(get_location(&expression->position()),
this->current_expression,
build_pointer_type_for_mode(TREE_TYPE(this->current_expression), VOIDmode, true));
TREE_NO_TRAMPOLINE(this->current_expression) = 1;
break;
case source::unary_operator::negation:
this->current_expression = build1_loc(get_location(&expression->position()), TRUTH_NOT_EXPR,