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

ifc 7.1: Internal compiler error for Character parameter

vsbabu
Beginner
545 Views
Calling code:
I__ = FWriteF(OutFile, 'My string is %s'//Char(0), MyString, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Function definition (in another library file):
Integer Function FWriteF(File,Format,
& Arg1, Arg2, Arg3, Arg4,
& Arg5, Arg6, Arg7, Arg8,
& Arg9, Arg10, Arg11, Arg12,
& Arg13, Arg14, Arg15, Arg16)

Implicit None

Integer File
Character(LEN=*) :: Format
! Character Format(*)

Character Format(*) passes compilation, but raises a run-time error because "the 2nd argument is an array but value actually passed is a scalar".

When I do Character(LEN=*) :: Format; compilation fails as below:
ifc -c c_formoutput.F -I/sandbox/linux/include -Dunix -Dlinux -Vaxlib -I../../src -I../../../af/src -I../../../cmn/src -132 -g -w -C -O0 -fPIC -o ../../../build/obj/debug/linux/mydir/c_formoutput.o
external function FWRITEF
*Compiler Internal Error* : Please report to Intel Corporation
compilation aborted for c_formoutput.F (code 1)


Upgrading to 8.x is not an option for me; but any pointers on how to resolve this?

Character Format(*) works fine with Sun Workshop Pro and IBM VisualAge Fortran compilers. In fact, in those compilers, it is not even required to put in all those zeroes in the function call to make the argument numbers match.

2nd question -- any easy way in Fortran77 to make variable function arguments like in C?
0 Kudos
2 Replies
vsbabu
Beginner
545 Views
Never mind. There were calls like Format(i) that I had to change to Format(i:i).

Quick question -- isn't Format a reserved word? I am surprised that this works.
0 Kudos
Steven_L_Intel1
Employee
545 Views
Fortran has no reserved words.
0 Kudos
Reply