https://gcc.gnu.org/g:7bf460b338845d1b9a581cca70a3191f76769816

commit r15-8572-g7bf460b338845d1b9a581cca70a3191f76769816
Author: Philip Herron <herron.phi...@googlemail.com>
Date:   Thu Dec 12 14:56:14 2024 +0000

    gccrs: fix bad not expression in rust
    
    Fixes Rust-GCC#3229
    
    gcc/rust/ChangeLog:
    
            * rust-gcc.cc (operator_to_tree_code): ! expressions are 
BIT_NOT_EXPR
    
    Signed-off-by: Philip Herron <herron.phi...@googlemail.com>

Diff:
---
 gcc/rust/rust-gcc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index 7da5e2c56377..37d51e58c08e 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -942,7 +942,7 @@ operator_to_tree_code (NegationOperator op)
     case NegationOperator::NEGATE:
       return NEGATE_EXPR;
     case NegationOperator::NOT:
-      return TRUTH_NOT_EXPR;
+      return BIT_NOT_EXPR;
     default:
       rust_unreachable ();
     }

Reply via email to