Skip to content

translate-c test regression of array alignment after LLVM 14 upgrade #12055

Description

@andrewrk

No idea why this is happening. Observed to happen on the FreeBSD CI and AArch64 Drone CI, after the LLVM 14 upgrade.

========= Expected to find: ===================
pub extern var my_array: [16]u8 align(128);
pub export fn my_fn() align(128) void {}
pub export fn other_fn() void {
    var ARR: [16]u8 align(16) = undefined;
    _ = ARR;
}
========= But file does not contain it: =======
pub extern var my_array: [16]u8;
pub export fn my_fn() align(128) void {}
pub export fn other_fn() void {
    var ARR: [16]u8 = undefined;
    _ = ARR;
}

Happens with stage1; have not confirmed whether it happens with stage2 or stage3 yet (could make a difference due to LLVM IR C ABI lowerings)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.stage1The process of building from source via WebAssembly and the C backend.translate-cC to Zig source translation feature (@cImport)

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions