Spurious "dependency loop detected" and "missing struct field" errors #17255
Labels
bug
Observed behavior contradicts documented or intended behavior
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
regression
It worked in a previous version of Zig, but stopped working.
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Zig Version
0.12.0-dev.494+a8d2ed806
Steps to Reproduce and Observed Behavior
Clone https://github.com/dweiller/zimalloc and run
I will try to make a smaller repro case and bisect the Zig commit introducing it when I get time (and llvm17 finishes compiling).A minimal repro case is below in #17255 (comment).Here is the full error message:
These errors are not encountered when compiling with 0.12.0-dev.464+a63a1c5cb (the commit that merged llvm17, though I can't find the tarball for this to test locally now, but my CI worked using it), so it seems the issue was introduced between that commit and when #17172 got merged.
The dependency loop issue shouldn't be the same issue as other dependency issue in the issue tracker (e.g. #16932, #16419, #14353) which are all about function pointers and affect earlier compiler versions than 0.12.0-dev.464+a63a1c5cb.
Expected Behavior
The code should compile as far as I can tell - the dependency loop is (according to the compile error) caused by a decl that is creates a type alias like
pub const Ptr = *align(alignment) @This();
and the missing struct fields all have default values.The text was updated successfully, but these errors were encountered: