- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I compile the following FFT code download from web. I got the error message below. I guess the code should be no problem to pass the compilition maybe in old Fortran 77 compiler since lots of people have used the codes. It looks related to the data transfer using pointer. Is there any compiling option I can play so pass the compiling without changing the code? Or if I need to change the data definition, what should I do? Thanks!
error #6633: The type of the actual argument differs from the type of the dummy argument. [WSAVE]
SUBROUTINE CFFTB (N,C,WSAVE)
DIMENSION C(1) ,WSAVE(1)
IF (N .EQ. 1) RETURN
IW1 = N+N+1
IW2 = IW1+N+N
CALL CFFTB1 (N,C,WSAVE,WSAVE(IW1),WSAVE(IW2))
RETURN
END
SUBROUTINE CFFTB1 (N,C,CH,WA,IFAC)
DIMENSION CH(1) ,C(1) ,WA(1) ,IFAC(1)
NF = IFAC(2)
......
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This code is illegal Fortran 77, but older compilers would not have been able to detect the error. Intel Fortran has a feature, on by default in Visual Studio solutions, that can detect this. The problem is the fifth argument you pass to CFFTB1. Since that argument you pass is named WSAVE and is not explicitly declared with a type, it is implicitly REAL. However, the corresponding dummy argument in CFFTB1 is named IFAC which makes it default INTEGER. The Fortran standard, even back in F77, requires that these match in type. You haven't shown enough of the code for me to understand exactly what this is trying to do - my guess is that there's an EQUIVALENCE in there between IW or IW2 and WSAVE. Mixing integer and real types can create subtle errors, though I think in this usage you'll probably avoid them.
You could turn off Diagnostics > Check Routine Interfaces, but better would be to correct the code. I can't tell you exactly how you should fix it, but you'll need to make sure that arguments you pass match in type, kind and number of dimensions.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page