diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-03 13:19:35 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-02-06 15:45:51 +0000 |
commit | 7098b373172354a9d68d319fdbfcc07f99970914 (patch) | |
tree | 400fbf63fbcf009f2be67eee51b150895e1451ad /gcc/rust/backend/rust-compile-context.h | |
parent | 75b6fc46bd64599e565582b46bf6f2197b2bc53f (diff) | |
download | gcc-7098b373172354a9d68d319fdbfcc07f99970914.zip gcc-7098b373172354a9d68d319fdbfcc07f99970914.tar.gz gcc-7098b373172354a9d68d319fdbfcc07f99970914.tar.bz2 |
Fix unreachable crash when a struct contains another algebraic data type
When we have a nested struct this must resolve to the existing compiled
struct and not create a new record type.
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 194ee06..7d131f2 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -283,8 +283,7 @@ public: { TyTy::StructFieldType *field = type.get_field (i); Btype *compiled_field_ty - = TyTyCompile::compile (ctx->get_backend (), - field->get_field_type ()); + = TyTyResolveCompile::compile (ctx, field->get_field_type ()); Backend::Btyped_identifier f (field->get_name (), compiled_field_ty, ctx->get_mappings ()->lookup_location ( |