from unix to linux

from unix to linux

Ritratto di let1ch

I'm trying to compile with ifc a program (f77), previously working just on unix machines (it's not a long time I use compilers).
With the options -O2 -Vaxlib -w -WB -o
I can compile all my subroutines except two external functions, for which I obtain the errors
"Error 294 : Function TOCMPLX has not been given a result value"
"Error 294 : Function TOIMAG has not been given a result value"
Those functions work well in unix (where I compile with
f77 -xO3 -xarch=v8 -dalign -o);
if I define a value for them, I can compile, but then the program runs without stopping and doesn't give results.
I could't find an option in the user guide to solve this problem, could someone help me?

4 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Steve Lionel (Intel)

I doubt an "option" is going to help. You need to debug the program to find out what is going wrong. I find it curious that you were able to run successfully before with functions that never defined their values.

I also note that you use -WB which disables array bounds checking - if you get array bounds errors without -WB, I think that's trying to tell you something...


Ritratto di Tim Prince

According to your description, it's unlikely that your program would have worked with the usual Unix f77 compilers, most of which have a resemblance to g77.
Options which could be useful in pointing out further problems, where your program deviates from Fortran, include -g -C.

Ritratto di

I got the same problem when compiling a few thousand fortran modules under hp-ux and two failed with this very error.

A workaround was to modify the program source so that it set a return value. (These two functions would have been type void in C).

So in the example above


as the first command in the fortran would allow the Function TOCMPLX to compile (but maybe not to work correctly).

Accedere per lasciare un commento.