-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allocatable array #22
Comments
You need deferred shape to declare an
With this Fort still has trouble, it would work only on exact rank. Another thing that is missing is allocate/deallocate statements. I have filed #23 for the shape and #24 for the allocation statements. Thank you for the submission, implementing those would be a step in the right direction. |
Thank you @ppenzin and hope to be able to use allocatable array with Fort soon. One more thing: once this issue is solved, will I be able to use, for instance,
as well? |
For clarity sake let's dedicate this issue to allocation/deallocation statements only and use #23 for the deferred shape. |
Implement full path to produce it in Parser and Sema. For llvm-fortran#22
Print deallocate statement in AST dumps. For llvm-fortran#22
Emitting allocatable arrays as poitners in IR. Emit call to `libfort_free` for all arguments to DEALLOCATE statement. Add a CodeGen test for dynamic memory managment. For llvm-fortran#22
Add types for allocation statement and array expression. Do basic verification for the array alocation semantics in ALLOCATE. Minor additition to the test. Create a more general type for allocation expression (instead of array allocation), but leave other cases unimplemented for now. Type of the allocation is the type of the target expression, which may not be correct in all cases. Add Sema support for ALLOCATE statements. For llvm-fortran#22
Produce a call to malloc with the right size, store ptr to allocated memory in the variable. Bitcast malloc's return value to the right pointer size, store to the target symbol. Add all of that to the test. For llvm-fortran#22
Hi,
I just built Fort together with the latest LLVM and Clang. I tried to compile the following simple Fortran code
a.f95
:But I got the following errors:
I wonder if Fort supports allocatable array and pointer now or not? If yes, how can I solve the errors? Thank you in advance.
The text was updated successfully, but these errors were encountered: