d: ICE in gimple_register_canonical_type_1, at lto/lto-common.c:430 (PR102094)
commit07984707be4eb9aea55dafbbc796790b8b8ac700
authorIain Buclaw <ibuclaw@gdcproject.org>
Sat, 28 Aug 2021 14:57:03 +0000 (28 16:57 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Aug 2021 15:19:02 +0000 (29 17:19 +0200)
tree16edae4dbde24c37964fd7b4cabcef202f832cf0
parentdc033e0149fd7790b89f816041e87a6ddc22e21c
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.
gcc/d/d-codegen.cc
gcc/testsuite/gdc.dg/lto/pr102094_0.d [new file with mode: 0644]