Topic: Problem when compiling: mismatch between scalar and rank-1 array

Hello. I am a new user o SF, and I am still a bit lost. I need to use an old fortran code, and I am having problems with mismatch arguments (a scalar passed to a rank-1 array). The code worked perfectly several years ago. The problem is with the new Gfortran compiler defaults:
"Gfortran 10 added the default behavior to make type mismatches an error instead of a warning. Legacy Fortran programs too often did not explicitly specify the procedure interfaces to allow implicit polymorphism. The Fortran 2008 standard cleaned up this situation in part with type(*).
Workaround: Gfortran flag " -fallow-argument-mismatch " can be used to degrade the errors to warnings. It is however strongly recommended to fix the problem in the legacy code, if it’s part of your code ownership."

So, I would like to pass the flag " -fallow-argument-mismatch " to the SF compiler. How should I proceed? Thank you in advance.

Re: Problem when compiling: mismatch between scalar and rank-1 array

You can enter compiler flags by opening the Project Options window from the Options menu under Project...  In the Project Options window, select the Compiler Flags category and enter that flag in the box labeled "Fortran."

https://simplyfortran.com/docs/full/windows/options/project_options_flags.png

Let me know if the above works!

Jeff Armstrong
Approximatrix, LLC

Re: Problem when compiling: mismatch between scalar and rank-1 array

Oh! Thank you very much!

Re: Problem when compiling: mismatch between scalar and rank-1 array

Unfortunately, passing the flag as indicated didn't solve the problem. I guess that the compiler is ignoring the flag. I also tried with "-std=legacy" because "-fallow-argument-mismatch" is contained in "-std=legacy". But didn't work also.
The problem is with an old code which tries to pass a Hollerith variable as an argument of another subroutine, where the variable which receives the Hollerith one is defined as an integer array of dimension 1. I will continue looking for a solution, because the old code is very good, and I would like to use it. For now, I managed myself in order to not use the problematic code. Thank you for your help, Jeff.