Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault with default initialization #1341

Closed
bmanga opened this issue May 2, 2024 · 0 comments · Fixed by #1348
Closed

Segfault with default initialization #1341

bmanga opened this issue May 2, 2024 · 0 comments · Fixed by #1348

Comments

@bmanga
Copy link
Contributor

bmanga commented May 2, 2024

Given the following code:

struct Vector4 {
    float data[4] = {};
};

kernel void fun() {
#ifdef FAIL
    Vector4 m;
#else
    Vector4 m = {};
#endif
}

Compiling using -cl-std=CLC++ --inline-entry-points -DFAIL results in

Instruction not handled:   %arrayinit.cur.i = phi ptr addrspace(4) [ %m.ascast, %entry ], [ %arrayinit.next.i, %arrayinit.body.i ]

I'm assuming this has something to do with where the initializer data is stored and is related to #1288 , but I wonder if this is easier to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant