Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28496 Discussions

Meaning of "warning #7762: This procedure is recursive by default."?

AONym
New Contributor II
1,741 Views

What is the significance of this warning message?

1>Compiling with Intel® Fortran Compiler Classic 2021.5.0 [Intel(R) 64]...
1>RationalArithmetic.f90
1>C:\Users\Username\AppData\Local\Temp\689213.i90: warning #7762: This procedure is recursive by default.

0 Kudos
1 Solution
AONym
New Contributor II
1,583 Views

Steve -

Found the cause of the error. Property page for RationalArithmetic.f90, config Debug|x64,  has /stand:f95 set; Release|x64 does not.

RatinalArithmeticPropertyPages.png

View solution in original post

0 Kudos
14 Replies
Steve_Lionel
Honored Contributor III
1,725 Views

I'd like to see more, including the function being defined and the compile options used.

Literally speaking, Fortran 2018, which current Intel Fortran supports, makes all procedures recursive by default. This means that you no longer have to use the RECURSIVE prefix if you call a procedure from within itself. (A new NON_RECURSIVE prefix is defined if you want to disable this.)

What I don't understand is under which circumstances the compiler would feel obligated to warn you about this. It certainly doesn't do it if you use the (now-redundant) RECURSIVE keyword. Something else must be triggering this.

0 Kudos
JohnNichols
Valued Contributor III
1,716 Views

So Fortran finally caught up with LISP.

0 Kudos
AONym
New Contributor II
1,706 Views

Steve -

I'm attaching the source. The temporary file 590813.i90 no longer exists. Here is the build log for DEBUG:

Build started: Project: MyApp_libFortran, Configuration: Debug|x64
Compiling with Intel® Fortran Compiler Classic 2021.5.0 [Intel(R) 64]...
Creating temporary file "RSP1.rsp" with contents
[
/nologo /debug:full /MP /Od /QaxCORE-AVX2 /Qunroll:0 /Qparallel /fpp /I"C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\include\intel64\lp64" /I"C:\MyDir\MyApp\nleqslv_libFortran\x64\Debug\Intermediate" /I"C:\MyDir\Gauss-Newton Least-Squares\x64\Debug" /I"C:\Numerical_Libraries\Numerical Recipes\x64\Debug" /DDebugLines /arch:SSE3 /extend-source:132 /noaltparam /Qopenmp /standard-semantics /Qcoarray:shared /fpscomp:nolibs /fpscomp:logicals /Qdiag-error-limit:3000 /stand:f95 /Qdiag-disable:8291 /warn:all /debug-parameters:all /Qauto /align:array64byte /Qtrapuv /fpe:0 /fpconstant /Qfp-stack-check /iface:mixed_str_len_arg /module:"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /object:"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /Fd"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\\vc170.pdb" /FAs /Fa"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /traceback /check:pointer /check:bounds /check:uninit /check:format /check:output_conversion /check:stack /libs:static /threads /dbglibs /winapp /Qmkl:parallel /c /Qsimd /Qopenmp /Qdiag-enable:15009 /Qlocation,link,"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64" /Qm64 "C:\MyDir\MyApp\MyApp_libFortran\RationalArithmetic.f90"
]
Creating command line "ifort @"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\RSP1.rsp""

C:\Users\Goedel\AppData\Local\Temp\590813.i90: warning #7762: This procedure is recursive by default.


MyApp_libFortran - 0 error(s), 1 warning(s)

---------------------------------------------------------------

Here is the build log for RELEASE, which does not give this warning:

Build started: Project: SedAnal_libFortran, Configuration: Release|x64

Compiling with Intel® Fortran Compiler Classic 2021.5.0 [Intel(R) 64]...
Creating temporary file "RSP1.rsp" with contents
[
/nologo /debug:full /MP /O3 /QaxCORE-AVX2 /Qparallel /Qvec-threshold:0 /Qip /fpp /I"C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\include\intel64\lp64" /I"C:\MyDir\MyApp\nleqslv_libFortran\x64\Release" /I"C:\MyDir\Gauss-Newton Least-Squares\x64\Release" /I"C:\Numerical_Libraries\Numerical Recipes\x64\Release" /I"C:\MyDir\MyApp\nleqslv_libFortran\x64\Release" /I"C:\MyDir\Gauss-Newton Least-Squares\x64\Release" /arch:SSE3 /extend-source:132 /noaltparam /Qopenmp /standard-semantics /Qcoarray:shared /fpscomp:nolibs /fpscomp:logicals /Qdiag-error-limit:3000 /warn:all /debug-parameters:all /Qopt-report:5 /Qauto /align:dcommons /align:array64byte /align:sequence /fpe:0 /fpconstant /names:uppercase /iface:mixed_str_len_arg /module:"C:\MyDir\MyApp\MyApp_libFortran\x64\Release\Intermediate\/" /object:"C:\MyDir\MyApp\MyApp_libFortran\x64\Release\Intermediate\/" /Fd"C:\MyDir\MyApp\MyApp_libFortran\x64\Release\Intermediate\\vc170.pdb" /FAs /Fa"C:\MyDir\MyApp\MyApp_libFortran\x64\Release\Intermediate\/" /libs:static /threads /winapp /Qmkl:parallel /c /Qsimd /Qopenmp /Qopenmp-simd /Qdiag-enable:15009 /Qopt-report-format:vs /Qlocation,link,"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64" /Qm64 "C:\MyDir\MyApp\MyApp_libFortran\RationalArithmetic.f90"
]
Creating command line "ifort @"C:\MyDir\MyApp\MyApp_libFortran\x64\Release\Intermediate\RSP1.rsp""

ifort: remark #10397: optimization reports are generated in *.optrpt files in the output location
C:\MyDir\MyApp\MyApp_libFortran\RationalArithmetic.f90(361): remark #15009: RATIONALARITHMETIC_mp_MATMULRAT has been targeted for automatic cpu dispatch


MyApp_libFortran - 0 error(s), 0 warning(s)

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,687 Views

>>The temporary file 590813.i90 no longer exists.

You are using fpp. 

Add /P to command line. This should preprocess then quit.

Maybe a conflict is being introduced with fpp and token substitution.

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
1,680 Views

OK, I got it. You enabled /stand:f95 and /standard-semantics. These two conflict a bit. /standard-semantics says to apply F2018 semantics, which includes default recursion. But then you asked for standards checking against F95, so the compiler is warning you that it applied semantics not part of F95. Subtle.

0 Kudos
AONym
New Contributor II
1,654 Views

Steve -

It's more subtle than you think. Using VS2022 IDE, there is no direct option for /stand:F95. However, I did find this, in Configuration Properties / Fortran / Diagnostics / General / Warn for Non-standard Fortran; it's set to "No" for both Debug and Release configurations. The description for this option appearing appearing at the bottom of the page is

Issues compile-time messages for language elements that are not standard in the Fortran 96/90/2003/2015/2018 language that can be identified at
compile-time. (/stand:{f90|f95|f03|f08|f15|f18} Property value '/stand:f15' is deprecated ad will be removed in a future release. Please use 'stand:f18' instead.

And under Command Line, it shows

 /nologo /debug:full /MP /Od /QaxCORE-AVX2 /Qunroll:0 /Qparallel /fpp /I"C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\include\intel64\lp64" /I"C:\MyDir\MyApp\nleqslv_libFortran\x64\Debug\Intermediate" /I"C:\MyDir\Gauss-Newton Least-Squares\x64\Debug" /I"C:\Numerical_Libraries\Numerical Recipes\x64\Debug" /DDebugLines /arch:SSE3 /extend-source:132 /noaltparam /Qopenmp /standard-semantics /Qcoarray:shared /fpscomp:nolibs /fpscomp:logicals /Qdiag-error-limit:3000 /Qdiag-disable:8291 /warn:all /debug-parameters:all /Qauto /align:array64byte /Qtrapuv /fpe:0 /fpconstant /Qfp-stack-check /iface:mixed_str_len_arg /module:"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /object:"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /Fd"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\\vc170.pdb" /FAcs /Fa"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\/" /gen-dep:"C:\MyDir\MyApp\MyApp_libFortran\x64\Debug\Intermediate\\MyApp_libFortran.dep" /traceback /check:pointer /check:bounds /check:uninit /check:format /check:output_conversion /check:stack /libs:static /threads /dbglibs /winapp /Qmkl:parallel /c
[Additional Options:]
/Qsimd /Qopenmp /Qdiag-enable:15009

which contains /standard-semantics, but not /stand:F95.

So, how should I remove the /stand:f95 option that is causing the unwanted warning?

0 Kudos
andrew_4619
Honored Contributor II
1,647 Views

Out of interest try adding /stand:f18   But I don't understand your earlier post shows  the strand 95 option, I don't see how that can be based on your latest post. Have you double checked.....

0 Kudos
AONym
New Contributor II
1,639 Views

Andrew -

The /stand:f95 option is in the file used in the Fortran compiler command line, but not in the command line shown by VS2022 under project properties.

0 Kudos
Steve_Lionel
Honored Contributor III
1,633 Views

I suggest that you check again - making sure you are looking at the correct configuration (Debug|x64 in the case you showed earlier). You can also ZIP the .vfproj file and attach it here so that I can look at it.

I checked VS2022, and there is both a project property for /stand:f95 and it shows in the Command Line page:

Screenshot 2022-02-09 132306.pngScreenshot 2022-02-09 132333.png

0 Kudos
AONym
New Contributor II
1,600 Views

Steve -

I checked again, and result is the same. Here are the Fortran settings for Debug|x64 (the configuration that gives the recursive warning):

libFortranPropertyPages.pngCommand Line shown in the configuration page includes /standard-semantics, but no other "stand" options.

But the temporary file RSP1 shown in the build log contains (in part)
standard-semantics /Qcoarray:shared /fpscomp:nolibs /fpscomp:logicals /Qdiag-error-limit:3000 /stand:f95 /Qdiag-disable:8291

0 Kudos
Steve_Lionel
Honored Contributor III
1,590 Views

Please ZIP the .vfproj file and attach it to a new reply here. Screenshots aren't sufficient.

0 Kudos
AONym
New Contributor II
1,584 Views

Steve -

Found the cause of the error. Property page for RationalArithmetic.f90, config Debug|x64,  has /stand:f95 set; Release|x64 does not.

RatinalArithmeticPropertyPages.png

0 Kudos
Steve_Lionel
Honored Contributor III
1,578 Views

See, this is why I asked for the .vfproj.  If you had provided that earlier, I would have spotted the problem immediately.

There is a tiny visual indication in the Solution Explorer for individual sources that have settings different from the project.

Steve_Lionel_0-1644874221750.png

See that little red mark on the file icon for Console10.f90? That means it has a customized setting.

0 Kudos
AONym
New Contributor II
1,570 Views

Red mark--good to know.

By looking at the .vfproj file myself, I found the problem. Next time I won't have to ask!

Reply