-
Notifications
You must be signed in to change notification settings - Fork 3
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
TLD: invalid code for anonymous union and struct types #102
Comments
bug137d is a test that fails in essentially the same way for an anonymous struct
|
After c0767f1 the failure reported here for bug137d.upc appears to be resolved. The test lockperf.upc still yields syntax errors in the translated C code, though the have changed since the initial report:
The erroneous code on line 372:
The code on lines 402 - 405, which looks like it was maybe intended to be a (duplicate?) typedef:
The remaining errors on liens 408 through 671 are all due to the missing defn of |
The AST makes this a bit inconvenient. The problem is that the declaration of the anonymous union appears immediately before the variable declaration. When we process the union declaration, there isn't enough information to determine whether it needs to be moved to the global scope. I think that means that we need to determine it when processing the entire DeclStmt, and pass this down to TransformDecl somehow. |
After applying the latest fix for #102 I am not able to compile any test - with or without pthreads. This is the assertion error I get:
I did update my branch with all the changes on the master, just in case. |
Translation of lockperf w/ pthreads enabled yields:
I suspect other tests using bupc_collectivev.h will fail in the same way.
Note the
<anonymous at /home/phargrov/upc-runtime/BUILD-gcc64/dbg_cupc2c/upc-tests/benchmarks/./bupc_collectivev.h:335:10>
is the problem here. This might have the same root cause as issue #83, but I am not certain of that.The text was updated successfully, but these errors were encountered: