Hi I have the following test example. If compiled under silverfrost, it complains as follows:
*** This generic call to IUADD is ambiguous as both of the specifics IUADD1 and IUADD2 could match the arguments as supplied
In Gfortran it compiles and runs fine. Is this intended behaviour? It seems to me that they are different arguments. This is a simplified example to show the issue. Thanks
MODULE ADDITIONS
INTERFACE IUADD
INTEGER*8 FUNCTION IUADD1(I1,I2)
INTEGER*8 :: I1, I2
END FUNCTION
INTEGER*8 FUNCTION IUADD2(I1,I2)
INTEGER*8 :: I1
INTEGER*4 :: I2
END FUNCTION
END INTERFACE
END MODULE
INTEGER*8 FUNCTION IUADD1(I1,I2)
INTEGER*8 :: I1, I2
IUADD1 = I1 + I2
END FUNCTION
INTEGER*8 FUNCTION IUADD2(I1,I2)
INTEGER*8 :: I1
INTEGER*4 :: I2
IUADD2 = I1 + I2
END FUNCTION
PROGRAM MAIN
USE ADDITIONS
INTEGER*8 K1, K2, KSUM
INTEGER*4 L2
K1 = 2
K2 = 5
L2 = 5
KSUM = IUADD(K1, L2) ! this works
KSUM = IUADD(K1, K2) ! this doesn't work in Silverforst (in GFortran yes)
PRINT*,'KSUM = ',KSUM
END PROGRAM