Skip to content

Commit f6bef09

Browse files
Milad FaV8 LUCI CQ
authored andcommitted
[turboshaft] initialize constant_value_ to an empty value
gcc-10 seems to have a bug were not initializing this value throws this compilation error: ``` src/compiler/turboshaft/assembler.h:680:16: error: ‘<anonymous>’ is used uninitialized in this function [-Werror=uninitialized] 680 | return Get(); ``` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465 Bug: v8:12783 Change-Id: I7a5fee5009b866a801326fba734c156c3cfdb1b0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5503350 Reviewed-by: Nico Hartmann <[email protected]> Commit-Queue: Milad Farazmand <[email protected]> Cr-Commit-Position: refs/heads/main@{#93675}
1 parent f1c9073 commit f6bef09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/turboshaft/index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ class ConstOrV {
671671
template <typename U,
672672
typename = std::enable_if_t<std::is_constructible_v<V<T>, V<U>>>>
673673
ConstOrV(V<U> index) // NOLINT(runtime/explicit)
674-
: constant_value_(), value_(index) {}
674+
: constant_value_(std::nullopt), value_(index) {}
675675

676676
bool is_constant() const { return constant_value_.has_value(); }
677677
constant_type constant_value() const {

0 commit comments

Comments
 (0)