Gfortran-15 bug/regression

Maybe I’m overlooking something, but I don’t think there is anything wrong with the code. As you say, you can make trivial changes to the code to make it work. For example, if you move the external function code within the file to before the main program instead of after, then it works.

gfortran tries to generate and check interfaces to external functions when the code for the function is visible to the compiler. I think it is trying to do that here, but it gets something wrong in the process.

1 Like