Hi Alex,

the problem you describe is well-known. It is a result of changes that
Apple made to the ARM Application Binary Interface when introducing
the M1, which disallow the a method that gcc (and, by
extension, gfortran) use for invoking nested functions, the
so-called trampolines.

There is a bug report tracking this issue,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168 . Iain Sandoe
is working on the port, see https://github.com/iains/gcc-darwin-arm64 .

To cut a long story short, this is (unfortunately) not yet supported.

Best regards

        Thomas

Reply via email to