]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix overflow intrinsic use before init
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 31 Aug 2023 10:32:18 +0000 (11:32 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:00:34 +0000 (19:00 +0100)
commit215b6acecb609d2a424e36116f1be8cf30d53438
treed26799377c662d71b26cf379133da85819553f35
parentad1c244dd607fd7607ef95eecc2718e98578a70c
gccrs: Fix overflow intrinsic use before init

The overflow intrinsic returns a tuple of (value, boolean) where it value
is the operator result and boolean if it overflowed or not. The intrinsic
here did not initilize the resulting tuple and therefore was creating a use
before init error resulting in garbage results

Addresses #1895

gcc/rust/ChangeLog:

* backend/rust-compile-intrinsic.cc (op_with_overflow_inner): fix use before init

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/backend/rust-compile-intrinsic.cc