-
Notifications
You must be signed in to change notification settings - Fork 5
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
Clang UPC does not diagnose THREADS present in more than one dimension #38
Comments
|
New version (PHHargrove@f1a9cd9) - seems to work correctly now with no crashes or other regressions. The approach taken is to check in SemaType while the multi-dimensional array is being constructed. This seemed easier than checking in SemaDecl, when the type is already fully constructed, but is also perhaps less natural than checking there. Thoughts? |
I tried a small test program:
which reports an error:
Is this maybe VLA related? As THREADS is just another variable it does allow it in the function content? |
bug3057 does have typedefs inside the function scope and clang-upc does not raise an error. |
My best guess is that the difference between Nenad's example of two comments back and bug3057 is related to VLA. I suspect that the new example is rejected by some VLA-related check before my new code has a chance to reject it. I can look at moving my new detection code earlier, but if that doesn't work I am not sure how to proceed. |
It looks unlikely that I will have time this week to work on this again. |
clang-upc is more permissive about typedefs than it is about variables. If these typedef are considered illegal, then the following
But, this type can appear in UPC programs (although it might not be Consider
Then the type of "a[0]" (which is a perfectly valid expression) is shared int[2], which we've just decided is an illegal array type. |
These tests form upc-semantics all fail (but used to pass at some point in time) - tests actually pass but should fail to compile. dyn-array-dim-not-simple-multiple-of-threads.upc
dyn-threads-more-than-once.upc
dyn-threads-with-indef-block-size.upc
|
Strike the previous message. We are having some issues with running the tests and the above compiled static. |
This issue is a report of the known failure of clang-upc to diagnose the two illegal typedefs in bug3057.upc of the Berkeley UPC testsuite:
I am testing a possible fix now to ensure it does not cause any regressions.
The text was updated successfully, but these errors were encountered: