- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks for looking at this.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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]
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You can't look up that issue ID. We haven't yet released a version that gives a traceback for that run-time warning.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Add option
-check:noarg_temp_created
to disable this warning message (which was added when you enabled all warnings).
Jim Dempsey
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The "temp created" diagnostics now will include a traceback with the 15.0 compiler.
