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

Incorrect support of addresses of the beginning of of arrays #10

Open
Ced opened this issue Sep 15, 2014 · 0 comments
Open

Incorrect support of addresses of the beginning of of arrays #10

Ced opened this issue Sep 15, 2014 · 0 comments

Comments

@Ced
Copy link
Collaborator

Ced commented Sep 15, 2014

Clan accepts such a code without complaining or providing a correct support:
for (i = ...)
for (j = ...) {
f(A[i][j]); // Reference to an array cell
f(A[i]); // Address of the first element of A[i], i.e., &A[i][0]
f(A); // Address of the first element of A, i.e., &A[0], equivalent to &A[0][0]
}
Clan shoud either report an error stating that accesses do not have the same dimensionality, or support it correctly with a conservative approach using local dimensions: A[i] can be translated to an access to the whole row (i.e. A[i][ld] with no constraint on the local dimension ld) while A can be translated to an access to the whole array (i.e. A[ld1][ld2] with no constraint on the local dimensions ld1 and ld2).

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

No branches or pull requests

1 participant