- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
forrtl: warning (402): fort: (1): In call to I/O Read routine, an array temporary was created for argument #2
forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument #3
Do you think these warnings are generated because of the -warn and -check flags?
Is there a way to get line number information in the source file? It seems 402 is a warning number not a source line.
What is meant by argument #n? If I have a read statement: read(*,*) a, b, c is argument, say, #2 b? Is there a reason why it never shows argument #1 in the warnings?
Thanks,
-Z
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "temp created" diagnostics now will include a traceback with the 15.0 compiler.
Link Copied
- 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
Thanks for looking at this.
- 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
Here was my test case:
[fortran]integer, target :: array(100)
integer, pointer :: p(:)
array = 3
p => array(1:99:2)
write (1,*) p
end
[/fortran]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi - I know this is an old thread but I just got the same warning, without an traceback either. Has the issue been resolved at all? Not sure how to look up that Issue ID#.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't look up that issue ID. We haven't yet released a version that gives a traceback for that run-time warning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add option
-check:noarg_temp_created
to disable this warning message (which was added when you enabled all warnings).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just installed ifort version 13.1.1 on my Linux Cluster and get this on runtime no matter what compiler options I use (-nocheck, -check noarg_temp_created, -w, etc) for compiling the main program or module containing the function:
function crs8(a,b) result(c)
real(8), intent(in) :: a(3),b(3)
real(8) :: c(3)
c(1)= a(2)*b(3)-a(3)*b(2)
c(2)=-a(1)*b(3)+a(3)*b(1)
c(3)= a(1)*b(2)-a(2)*b(1)
end function crs8
forrtl: warning (402): fort: (1): In call to VECTOR^CRS8, an array temporary was created for argument #1
forrtl: warning (402): fort: (1): In call to VECTOR^CRS8, an array temporary was created for argument #2
This is extremely annoying. What do I need to be doing differently?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You get this warning when compiling with "-check noarg_temp_created" or -nocheck? If so this is likely a bug. Could you attach a program which reproduces the problem? This will help us investigate the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Separate to the warning being triggered when not requested - you may find that making the dummy arguments assumed shape (:) rather than explicit shape avoids the need for temporaries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that you have to disable (or not enable) this option when compiling the source that calls the function. It isn't looked at when you compile the called function itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "temp created" diagnostics now will include a traceback with the 15.0 compiler.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page