-
Notifications
You must be signed in to change notification settings - Fork 46
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
Evaluation of pointer #52
Comments
Thanks for the report! Do you have a minimal example that throws the error? I couldn't seem to reproduce it with just the just your snippet, using the code below (with inputs and outputs to ensure the whole computation isn't optimized to nothing...):
|
Hi, thanks for getting back to me! Compute.c
Compute.h
Can you reproduce the exception with this? |
I was able to reproduce the error you got, thanks. It looks like this is a bug in the way that the compiler handles passing arrays of structs with array members to functions. I'll try to look into this a bit more deeply and get back to you, but as a workaround, you could try moving the declaration to a global variable. For example, the following compiles without error:
|
This does compile successfully! Thank you. One thing that might help you find the bug is that even removing 1 "if" statement in the code I previously posted, makes it work. |
I'm stumbling on a weird error. I got an array of structs like this:
Now I have a separate state variable
int state_a
, which I then use to accesstriple_patterns
like this:This does not work, see stacktrace below.
What does work is this:
What am I missing in the first example that makes it fail to compile?
Thanks
Stacktrace:
The text was updated successfully, but these errors were encountered: