Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Build fails for no apparent reason

WSinc
New Contributor I
818 Views
When I just added a new routine PAWN, it tells me that there are TWO MAIN programs.
When I remove that routine, it builds with no problems, providing I remove the CALL to it.

All routines in the project compiled with no errors or warnings

The PAWN routine has the exact same interface as 5others, so I don't see
why it would trigger this error message. I don't see anyhting unusual about it, in other words.

I am wondering if "stripping the guts out" wouldallow itto complete the build.
I will experiment further.

The enclosed archive was made with 7-ZIP, its supposed to be compatible.

Could this be an environmental concern? I tunred off the SPYWARE, and did a reboot, same result.

Any ideas?
0 Kudos
1 Solution
IanH
Honored Contributor III
818 Views
Right at the bottom of pawn.f90 (line 47, ten lines below the rest of the code) you have a stray END statement. An end statement on its own is valid - it defines a empty main program. That empty main program clashes with your other "intended" main program.

View solution in original post

0 Kudos
3 Replies
IanH
Honored Contributor III
819 Views
Right at the bottom of pawn.f90 (line 47, ten lines below the rest of the code) you have a stray END statement. An end statement on its own is valid - it defines a empty main program. That empty main program clashes with your other "intended" main program.
0 Kudos
WSinc
New Contributor I
818 Views
Boy, I never would have caught that ! ! !

But why wouldn't it look for a PROGRAM statement?

It seems rather strange, anyway - - - -
0 Kudos
Steven_L_Intel1
Employee
818 Views
PROGRAM statement is optional - as Ian says, an END not preceded by a SUBROUTINE, FUNCTION, BLOCK DATA or MODULE, ends a main program.
0 Kudos
Reply