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

OOP help

Izaak_Beekman
New Contributor II
428 Views
Note updated May 3 2010 2:35 EST (UTC -5)
In a module subroutine I define the the following variable:
[fortran]    CLASS(mesh_3d),         INTENT(inout) :: grid[/fortran]

The mesh_3d type is contained in a module accessed by USE association. (The use statement is in the module, before the contains statement after which the subroutine is defined)
[fortran]       SELECT TYPE (grid)
       TYPE IS (cart_mesh_3d)
       ...[/fortran]
If I insert the following code as the first executable line of my subroutine,
(I then do reference grid in the body of the select type statement) I get the following error:
[plain]/home/ibeekman/Sandbox/crocco/postprocessers/cartesian/FPPTC/trunk/src/modfileio.F90(83): remark #7712: This variable has not been used.   [GRID]
    SELECT TYPE (grid)
-----------------^[/plain]
If I move this down to a point in the subroutine after I have performed some operation referencing grid this warning/error goes away. Can anyone tell if I'm doing something wrong?

Further update:
Code needs to be compiled with -warn all
I have now attached reproducer example code. Compile with -warn all
0 Kudos
6 Replies
Steven_L_Intel1
Employee
428 Views
It would help if you could provide a complete example, but.. That's an informational message, not an error, and you would get it only if -warn unused was in effect. It could be that the compiler is not properly noting the use in a SELECT TYPE as a "use" - I'll see if I can come up with a test case showing that and report it to the developers.
0 Kudos
Izaak_Beekman
New Contributor II
428 Views
Yup, sorry I just included a test case. I forgot about the -warn all flag when generating the reproducer code, but then suddenly remembered it, and got the reproducer working.
0 Kudos
Steven_L_Intel1
Employee
428 Views
Thanks, but I managed to come up with one on my own. Escalated as issue DPD200154617.
0 Kudos
bucky83
Beginner
428 Views
Is this "Sort Of Bug" going to be fixed any time soon?

It's no big deal, but it is annoying nonetheless.

Dario
0 Kudos
Kevin_D_Intel
Employee
428 Views

There's nothing in the internal tracking reportsuggesting afix on theimmediate horizon. I pingedDevelopment for status and will post an update when I hear from them.

0 Kudos
Steven_L_Intel1
Employee
428 Views
This bug has been fixed for a release later this year.
0 Kudos
Reply