-
Notifications
You must be signed in to change notification settings - Fork 5
Generated itype incompatibility in test hash.c
#349
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
Comments
hash.c
does not compilehash.c
I reduced the above code into a minimum example:
rewrites to:
The generic is correctly inferred inside of |
@mwhicks1 and @jackastner asked for addition details about this issue: The The error seen above is with the first of these, However, if I add a call to foo using a type with two arrays, the currently correct rewriting of The full example with the initial fix mentioned above is:
rewrites to:
On the other hand, this can only affect the 2nd+ pointer levels now, so I could deal with it later. I suspect it will come up when inferring the first pointer level, which is the work I'll be doing next. |
I'm a little unsure where we are on all of this. It seems to me that:
Does that seem right @kyleheadley ? |
I'll add the simplified version above as a test and an xfail test for the over-constrained version. The other issue exists as #358, which describes possible improvements (ie current limitations) to generic type inference, ordered roughly by complexity and value to our goals. It stands as a reminder of what not to worry about yet as much as what to do next. "void**" is number 4, this bugfix is part of number 1. |
This issue was solved by #361, but an aspect still remains as issue #367. The correctness problem was that rewriting didn't stop at the generic variable, instead continuing on to add atoms from the full analysis. This was solved by using typedef info (generics are represented internally by typedefs), which itself had a bug, being defined by the wrong data. Solving the typedef issue solved the generic rewriting as well. The remaining aspect is that the type and itype are identical and therefor only one is necessary. |
Running
3c -alltypes hash.c
in our test directory returns a file with this declaration near line 25Clang will not compile it (even with
-f3c-tool
) because the type and itype ofp_dest
conflict.The text was updated successfully, but these errors were encountered: