Skip to content

Error on passing nested structure by value #489

Open
@Wuerfel21

Description

@Wuerfel21
typedef	struct {
    int x,y;
} Point;
typedef	struct {
    Point ul,lr;
} Rect;

void foo(Rect r) {
    
}

void main() {
    Rect r = {{1,2},{3,4}};
    foo(r);
}

begets
structpass.c:14: error: Internal error, couldn't find object variable with offset 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions