- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We've fixed the compiler to give a reasonable error message for this incorrect syntax. The fix will be in a future release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page