ArachnidAbby / BCL

BCL Compiled Language (BCL)
https://discord.gg/sShr7fMNFn
GNU General Public License v3.0
21 stars 0 forks source link

[BUG] Compiler crashes with circular struct definitions #16

Open ArachnidAbby opened 1 year ago

ArachnidAbby commented 1 year ago

Describe the bug The compiler doesn't stop you from doing circular struct defs and LLVM tries to infinitely resolve the type. Resulting in a crash, especially when trying to determine the ABI size.

To Reproduce

struct X {
     element: Y;
}

struct Y {
     element: X;
}

Expected behavior Compiler Error

Error given, or a screenshot of the bug

Nothing, I think it segfaults? I can't remember.

platform information

compiler-version: 0.6.0
os: Linux-x64