- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Unfortunately, I think I have encountered yet another IVF11.1 bug.
It seems that component access to integer and real values via a class pointer gives the wrong result if the class pointer is contained in an array of a type. See the attached code. The first write statement outputs the wrong values.
Interestingly, in this particular case, the debugger does display the correct information, but the code fails. Also, it seem that only integer and real as displayed wrong. Characters work fine, also TYPEs and POINTERS to other objects seem to work fine.
It works ok if using a class pointer directly. The second write give the right results.
The bug appears with IVF 11.1.051, I did not try older releases.
It seems that component access to integer and real values via a class pointer gives the wrong result if the class pointer is contained in an array of a type. See the attached code. The first write statement outputs the wrong values.
Interestingly, in this particular case, the debugger does display the correct information, but the code fails. Also, it seem that only integer and real as displayed wrong. Characters work fine, also TYPEs and POINTERS to other objects seem to work fine.
It works ok if using a class pointer directly. The second write give the right results.
The bug appears with IVF 11.1.051, I did not try older releases.
[plain] program CompAccessBug
implicit none
! Type definitions
TYPE :: BaseType
INTEGER :: i
REAL :: r
CHARACTER :: c
END TYPE
TYPE :: ExtType
INTEGER :: i2
END TYPE
TYPE TypePtr
CLASS (BaseType), POINTER :: Ptr
END TYPE
! Variables
TYPE (BaseType), TARGET :: ExtInst
TYPE (TypePtr) :: PtrInst(1)
class (BaseType), POINTER :: Ptr
! ------
print *, 'Hello World'
ExtInst%i = 1
ExtInst%r = 2.0
ExtInst%c = 'c'
PtrInst(1)%Ptr => ExtInst
WRITE(*,*) PtrInst(1)%Ptr%i, PtrInst(1)%Ptr%r, PtrInst(1)%Ptr%c
Ptr=>PtrInst(1)%Ptr
WRITE(*,*) Ptr%i, Ptr%r, Ptr%c
end program CompAccessBug
[/plain]
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
4 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks, we'll take a look.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Escalated as issue DPD200141737. This is not a new bug in that it was broken from the original 11.1.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I expect the fix for this to be in Update 5.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It actually got fixed in 11.1 Update 6, available now.
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla