Skip to content

stage2 compiler crashes initializing global vector #13063

@billzez

Description

@billzez

Zig Version

0.10.0-dev.4217+9d8cdb855

Steps to Reproduce

const Vec2 = @Vector(2, f32);

var pos = Vec2{ 0.0, 0.0 };

pub fn main() void {
    pos = Vec2{ 0.0, 0.0 };
}

Expected Behavior

Compiles

Actual Behavior

$ zig build-exe main.zig 
Segmentation fault

Metadata

Metadata

Assignees

Labels

bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions