Skip to content

Inliner not copying returned static arrays #22297

@limepoutine

Description

@limepoutine
int[4] arr;

int[4] f() => arr;

void main()
{
    f().ptr[1] = 1;
    assert(arr[1] == 0);
}

Fails with -inline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions