- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using Intel Fortran 12.1 update 8.
When I compile the following small program with all error checking enabled (/check:all),
the array bounds bug is not detected. Does the compiler check for bounds errors when
an array is accessed though a pointer? Would the new update 10 detect this errror?
Roman
[fortran]program test_pointer_bounds implicit none integer,allocatable,target:: a(:) integer,pointer:: pa(:) allocate( a(3) ) a = 0 pa => a(3:4) !!! pa(2) = 1 write(*,*) a stop end program test_pointer_bounds [/fortran]
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is, in my view, a compiler bug. If it has not been previously reported, I will let the developers know. Issue ID is DPD200182047.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Array bounds checking in pointer assignment has been implemented for a future (2016) major release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
In 3 years, you haven't changed a bit !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Only if that were so....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure that this has been fixed? I have just tried compiling with the latest compiler (16.0.1.146), and the bounds checking does not produce any errors. I have all error checking enabled:
ifort /nologo /debug:full /Od /stand:f08 /warn:unused /warn:interfaces /Qtrapuv /Qinit:snan /Qinit:arrays /fpe:0 /Qfp-stack-check /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc100.pdb" /traceback /check:all /libs:static /threads /dbglibs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have been clearer. I meant a major release scheduled for 2016, not the "2016" product. Sorry for the confusion.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page