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

Compiler error with /fpp

ferrad
New User
275 Views
I have lots of code stretching beyond column 72. Also I am now using /fpp to help in my debugging sessions. These appear to be incompatible. Example below:
t1.for:
!DEC$ FIXEDFORMLINESIZE: 132
subroutine test(yyy)
integer j,iun,nm2
real*8 yyy,pc_inter(10)
nm2 = 10
write(iun,'(a,e16.8)') ' PrsI: ', (pc_inter(j),j=1,nm2)
return
end
compile with:
ifort /nologo /c /iface:cvf /Od /Zi /check:all /fpe:0 /dbglibs /Tft1.for /fpp
and I get:
t1.for(9) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: , )
write(iun,'(a,e16.8)') ' PrsI: ', (pc_inter(j),j=1,nm2
------------------------------------------------------------------------^
So it seems it's losing the last ) which is column 73, even though I have specified that line line must stretch to 132. It compiles OK without the /fpp.
Any idea why?
Adrian
0 Kudos
2 Replies
TimP
Honored Contributor III
275 Views
A long time ago, we established that fpp pre-processing wasn't fully supported for fixed form extended source format. I haven't heard of any change. I think all the files in the compiler include directory would have to change accordingly, where they have free form continuation marks in column 73. I have used only the command line option for fixed form extended, but that may not make any difference.
In many cases, we use separate pre-processors, where we don't want the specific features of ifort /fpp. The problem, of course, is this works well only in a Makefile build environment, not AFAIK under Visual Studio.
0 Kudos
Lorri_M_Intel
Employee
275 Views

If you add /extend_source to your command line, then fpp will see beyond character 72.

fppdoesnot parsethe !dec$fixedformlinesize statement; it works on the C-style preprocessing statements only.

I do understand (really!) that you put in the statement above so you wouldn't have to explicitly set the /extend_source command line option, but that's not how fpp works now.

- Lorri

0 Kudos
Reply