- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Unfortunately, we are experiencing a problem with the newly released IVF 11.1.051.
It seems like class pointers no longer work correctly. Any attempt to associate a single class pointer results in an access violation in debug mode (See TypePtr => BaseInstance statement in code). This does not occur when the class pointer is wrapped in a type (see ClassPtr%Ptr => BaseInstance).
Unfortunately, this bug makes it impossible for us to use the new version, as it also prohibits the use of select type statements (see code below).
The problem doesonly occur in debug mode, release modeworks fine. Further, it did notoccur withv11.0.46.
Best regards,
Thomas
[plain]! SelectTypeBug.f90 !**************************************************************************** ! ! PROGRAM: ClassPtrBug ! ! PURPOSE: Demonstrate access violations with class pointers in debug with IVF 11.1.051 ! !**************************************************************************** program ClassPtrBug implicit none ! Variables TYPE :: BaseType INTEGER :: val END TYPE TYPE, EXTENDS (BaseType) :: ExtType INTEGER :: val2 END TYPE TYPE :: PtrType CLASS (BaseType), POINTER :: Ptr END TYPE TYPE (BaseType), TARGET :: BaseInstance TYPE (ExtType), TARGET :: ExtInstance CLASS (BaseType), POINTER :: TypePtr Type (PtrType) :: ClassPtr ! Body of ClassPtrBug TypePtr => BaseInstance ! This line causes an access violation in debug mode ClassPtr%Ptr => BaseInstance ! This line works ok SELECT TYPE (Instance => ClassPtr%Ptr) ! This select type also causes access violation in debug mode TYPE IS (BaseType) WRITE (*,*) 'This is the base type' TYPE IS (ExtType) WRITE (*,*) 'This is the base type' END SELECT end program ClassPtrBug [/plain]
- Etiquetas:
- Intel® Fortran Compiler
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
The error is triggered by having /gen-interfaces enabled. (Note that /warn:interface implies /gen-interfaces). So as a workaround, turn off both Generate Interface Blocks and Check Routine Interfaces on the Diagnostics property page.
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
The error is triggered by having /gen-interfaces enabled. (Note that /warn:interface implies /gen-interfaces). So as a workaround, turn off both Generate Interface Blocks and Check Routine Interfaces on the Diagnostics property page.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
"CLASS ..."
"TYPE, EXTENDS ..."
"SELECT TYPE..."
"TYPE IS ..."
Are they Fortran (standard)? or some kind of extension? Thanks.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Fortran 2003 Standard
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
There is another issue related to this. Let's say the integers received any valid value. If you try to printon the screen using the working pointer (ClassPtr%Ptr%val for the base class), only zero is printed,no matter ifyouare using debug or release mode. Notice that in debug mode, if you try to check their values using the watch window,the pointer shows the correct value.
Changing Generate Interface Blocks and Check Routine Interfaces on the Diagnostics property page did not solve this problem.
Regards,
Roger
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
.vfproj file attached.
Thanks
Roger
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
This was fixed in Composer XE 2011.
- 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