- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to debug the following small program in Visual Studio 2008 with Intel Visual Fortran Compiler Integration for Microsoft Visual Studio* 2008, 11.1.3469.2008:
program allocstringtest
character(:), allocatable :: chararray
integer, allocatable :: intarray(:)
chararray = 'this is some text'
intarray = [ 3, 4, 5 ]
write(*,*) chararray
write(*,*) intarray
end program allocstringtest
The program compiles and runs fine:
c:\\allocstringtest>ifort /debug:all /assume:realloc_lhs allocstring.f90
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
Microsoft Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
-out:allocstring.exe
-debug
-pdb:allocstring.pdb
-subsystem:console
allocstring.obj
c:\\allocstringtest>allocstring.exe
this is some text
3 4 5
However, when I try to display the value of chararray in the debugger, I get the following error message as the value of the variable:
"Substring arguments out of bounds"
I get the same message regardless of if the variable has been assigned or not. Contrary to chararray, the value of intarray displays correctly in the debugger after it has been assigned its value.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page