-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support for large code model is needed for large static arrays (ARM64 ADRP out of range) #100
Comments
I was able to determine that if the size of static arrays exceeds 4 GB the F77 code will not link on M1 Apple Silicon, gcc12.2, Ventura. Your example show a total array size of 6.04 GB. If I shrink my array size to less that 2GB it links and runs. |
Background: my code compiles and links on Intel under macOS, Linux Ubuntu, Windows. |
Since you do not show any code, I am guessing that the issue is (as mentioned by @rbspielman-ur) a large static array. I'd expect that you could work around this by dynamic allocation of that array. Otherwise, we would need to support the large code model to handle it (and I am not sure when there will be time to implement that). |
I am going to close this, but we now have issue #100 which is asking for support for the large code model; perhaps that would also be useful in this case. |
(for cross-referencing purposes, I'm pretty sure this is bug 90698 on the gcc bugzilla) |
When compiling a fortran code on my mac M1 (os Monterey) I get the following error. Any idea ?
ARM64 ADRP out of range (6040592384 max is +/-4GB): from velo (0x10000D590) to sourcedp (0x2680CF6F0) in 'velo' from /var/folders/7j/1b_gs76w8xlcf50059bjh4yh0000gp/T//cc18CNIc.o for architecture arm64
The text was updated successfully, but these errors were encountered: