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

Wrong host association dependencies

Daniel_Dopico
New Contributor I
1,247 Views

This small code compiles with IFX but it does not compile with gfortran (error: Error: Symbol 'vara2' referenced at (1) not found in module 'b'). I think gfortran is right and the code is not correct.

module a
IMPLICIT NONE
    INTEGER::vara1
    INTEGER::vara2
CONTAINS
end module a

module b
USE a,only:vara1
IMPLICIT NONE
    INTEGER::varb
CONTAINS
end module b

program main
USE a
USE b, ONLY: vara2

end program main

As an additional comment, I am getting a lot of ICE related to USE in the specification part of modules. Some of these ICE dissapear when you  avoid the USE in the specification part by replacing them for USE in the specific subroutines needing them, but of course this is not always possible and, when possible, it doesn't always work.

I put tickets on some ICE but unfortunately I am not being able to reproduce all of them because they usually involve submodules, type-bound procedures and complex derived types.

There is something very wrong with host association in IFX.

0 Kudos
1 Solution
Ron_Green
Moderator
1,023 Views

Very good.  I will review case 06692932 and get that to our development team and assigned to the correct person.

 

Thank you for sending this example to us to help improve the compiler.

View solution in original post

3 Replies
Ron_Green
Moderator
1,121 Views

IFX needs a error message for this.  I will create a bug report.

0 Kudos
Daniel_Dopico
New Contributor I
1,111 Views
Thank you, Ron.
I already did that. It is case 06692932.
0 Kudos
Ron_Green
Moderator
1,024 Views

Very good.  I will review case 06692932 and get that to our development team and assigned to the correct person.

 

Thank you for sending this example to us to help improve the compiler.

Reply