diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-04-02 21:59:50 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:28:43 +0100 |
commit | 072d8e660bbd0996f5b2ff3567a45c9876986052 (patch) | |
tree | 4f17eb92cb77687f38b99af0c3902533067ea87e /gcc/rust/ast/rust-ast-dump.h | |
parent | 8bc2a3e40e86a6a125c985f05616537c130cb2cb (diff) | |
download | gcc-072d8e660bbd0996f5b2ff3567a45c9876986052.zip gcc-072d8e660bbd0996f5b2ff3567a45c9876986052.tar.gz gcc-072d8e660bbd0996f5b2ff3567a45c9876986052.tar.bz2 |
gccrs: Fix ICE using constructors for intilizers in statics
We are getting constant expressions for the initilizers for static items
this hits an assertion in the GCC middle-end which is looking for a
constructor so we need to unwrap the constant expression using DECL_INITIAL
as the initilizer to the global static.
Fixes #2080
gcc/rust/ChangeLog:
* backend/rust-compile-item.cc (CompileItem::visit): unwrap the constant expression
gcc/testsuite/ChangeLog:
* rust/execute/torture/issue-2080.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast-dump.h')
0 files changed, 0 insertions, 0 deletions