- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I'm using MS Visual Studio 2010 with Intel Visual Fortran Composer XE 2011 Update 6 Integration for Microsoft Visual Studio* 2010, 12.1.3514.2010, on a 32-bit XP machine. This simple program:
_______________
program mtest
character dumst(len=80)
write(*,*) 'Hello World'
call short_routine
end program mtest
!******************************
subroutine short_routine
character dumst2(len=80)
write(*,*) 'Hello World II'
end subroutine short_routine
__________________________
gives methe following error:
catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for .......
Yet when I comment out the character declaration for DUMST2 in the subroutine, it compiles fine. I've used "character dumst2(kind=80)" also and it does the same thing - that is, produces the catastrophic error. The only thing that works is "character dumst2*80". Funny that the compiler acceptsthe "character dumst(len=80)" in the main program.
Is this a known bug?
AEB
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Your post seems to confuse KIND= and LEN=. You seem to be using LEN=, but you talk about KIND=80. Intel Fortran supports only KIND=1 for CHARACTER.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Anyway, here's the command line used:
/nologo /debug:full /Od /warn:interfaces /module:"Debug\" /object:"Debug\" /Fd"Debug\vc100.pdb" /traceback /check:bounds /libs:qwin /dbglibs /c
Amalia
- 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 syntax you cite in the thread title, CHARACTER(KIND=) or CHARACTER(LEN=) is legal. However,
CHARACTER dunst(LEN=80)
is not legal syntax. The only way you are allowed to specify the length after the variable name is with the *n syntax, such as dunst*80.
Nevertheless, there is a compiler bug here - it should not have allowed (LEN=80) or (KIND=80) following the variable name. If you correct the syntax, the program will compile.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
We've fixed the compiler to give a reasonable error message for this incorrect syntax. The fix will be in a future release.
- 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