diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-08-28 16:57:03 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-08-29 17:19:02 +0200 |
commit | 07984707be4eb9aea55dafbbc796790b8b8ac700 (patch) | |
tree | 16edae4dbde24c37964fd7b4cabcef202f832cf0 /gcc/d/d-codegen.cc | |
parent | dc033e0149fd7790b89f816041e87a6ddc22e21c (diff) | |
download | gcc-07984707be4eb9aea55dafbbc796790b8b8ac700.zip gcc-07984707be4eb9aea55dafbbc796790b8b8ac700.tar.gz gcc-07984707be4eb9aea55dafbbc796790b8b8ac700.tar.bz2 |
d: ICE in gimple_register_canonical_type_1, at lto/lto-common.c:430 (PR102094)
User defined types have the TYPE_CXX_ODR_P flag set, but closure frames
did not. This mismatch led to an ICE in the conflict detection for ODR
and interoperable non-ODR types. As a given closure frame is tied
explicitly to a function, it already conforms to ODR.
PR d/102094
gcc/d/ChangeLog:
* d-codegen.cc (build_frame_type): Set TYPE_CXX_ODR_P.
gcc/testsuite/ChangeLog:
* gdc.dg/lto/pr102094_0.d: New test.
Diffstat (limited to 'gcc/d/d-codegen.cc')
-rw-r--r-- | gcc/d/d-codegen.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index fe2ad98..ad20bd1 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -2563,6 +2563,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd) TYPE_FIELDS (frame_rec_type) = fields; TYPE_READONLY (frame_rec_type) = 1; + TYPE_CXX_ODR_P (frame_rec_type) = 1; layout_type (frame_rec_type); d_keep (frame_rec_type); |