Open fherpin opened 1 year ago
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.
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.
^^^ that was not meant to be attached to this issue but to #88
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).
(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