https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406
--- Comment #10 from ibuclaw at gcc dot gnu.org ---
Looking at an ICE in stage2 D compiler for i686-darwin17, I realized that it's
another facet of this issue.
// aggregate.d
import dsymbol;
extern (C++) class AggregateDeclaration : ScopeDsymbol
{
Visibility visibility;
override Visibility visible() { return visibility; }
}
// dsymbol.d
struct Visibility
{
enum Kind { undefined }
Kind kind;
}
extern(C++) class ScopeDsymbol
{
Visibility visible();
Visibility.Kind* visibilities;
}
When compiling dsymbol.d, `struct Visibility` is set SImode. However when
compiling aggregate.d it's instead given BLKmode. This causes all the
difference in how it is returned. Any C++ code interfacing with this will
crash due to the mismatch too.