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

Intel compiler misleading HOST and USE association to arrays in submodules?

Daniel_Dopico
New Contributor I
355 Views

1>D:\temp\Fallo_compilador2\restricciones.f90(33): error #7986: A use associated object that has the PROTECTED attribute shall not appear in a variable definition context.   [PROTREALVECT]

The mentioned error is obtained with the following piece of code in an Intel Parallel Studio XE 2017 Update 5 and Intel Parallel Studio XE 2018. I paste the code and I also attach the code and compilation results. Just to mention, the error is because of sentence "protrealvect(1)=5.d0". If I comment this one, the rest of the code works fine.

!C************************************************************
MODULE parent_module
IMPLICIT NONE
   
!> Private, public and public protected variables
INTEGER,PRIVATE::priv
INTEGER,PUBLIC::publ
INTEGER,PUBLIC,PROTECTED::prot
REAL(8),PUBLIC,PROTECTED::protreal
REAL(8),PUBLIC,PROTECTED,DIMENSION(1)::protrealvect
   
!> Submodule subroutine interface
INTERFACE
    MODULE SUBROUTINE modifVariables
    END SUBROUTINE modifVariables
END INTERFACE
END MODULE parent_module
!C************************************************************
!C************************************************************
SUBMODULE (parent_module) submod1
IMPLICIT NONE
CONTAINS
MODULE SUBROUTINE modifVariables
   
    priv=-1
    publ=2
    prot=-3
    protreal=-3.d0
    protrealvect(1)=5.d0
END SUBROUTINE modifVariables
END SUBMODULE submod1
!C************************************************************
 
0 Kudos
1 Solution
FortranFan
Honored Contributor II
355 Views

It looks like a bug in the Intel Fortran compiler, note Intel now expects you to submit an incident on all their product-related issues at their Online Service Center (OSC) which you may want to do:

https://supporttickets.intel.com/?lang=en-US

View solution in original post

0 Kudos
4 Replies
FortranFan
Honored Contributor II
356 Views

It looks like a bug in the Intel Fortran compiler, note Intel now expects you to submit an incident on all their product-related issues at their Online Service Center (OSC) which you may want to do:

https://supporttickets.intel.com/?lang=en-US

0 Kudos
Daniel_Dopico
New Contributor I
355 Views

Thank you FF. I already did that. Let's wait for their response and occasionally to have it corrected in the next release.

 

0 Kudos
Daniel_Dopico
New Contributor I
355 Views

Finally, after "only" 5 months, this bug was corrected in the 2018 update 2. I had to guess it, because despite of all my efforts Intel didn't inform me about the correction. I am pretty sure that they are too busy to pay attention to the people paying for their licenses.

0 Kudos
Daniel_Dopico
New Contributor I
355 Views

Well, to be honest, I have to point out that at least in this case, they told me in advance that apparently the bug was going to be fixed in the second next release, and they were right. I still miss more communication though.

0 Kudos
Reply