- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I've attached a very short example that exposes an optimization bug in the new version 15.0 Fortran compiler. This is not present in earlier versions. The problem appears to be associated with a reference to the intrinsic COUNT (with DIM argument) used as an actual argument. Details are in the files (code needs to be split across 2 source files to manifest the bug.)
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I meant to add some essential features of the example discovered while producing it:
- I can't seem to produce the error with 32-bit reals.
- The error disappears if the array is made slightly smaller, (2,24) for example.
- The unused local derived type variable is essential to the error.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thank you for reporting the issue and for attaching the files. We'll investigate and follow up.
Patrick
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I've confirmed it's a Linux-only bug (OK on Windows), and a regression WRT ifort Version 14.0.3.174 Build 20140422.
The bug also appears in 14.0.4, and -O1 is a workaround, for both 14.0.4 and 15.0.0
[U533534]$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.4.211 Build 20140805
Copyright (C) 1985-2014 Intel Corporation. All rights reserved.
[U533534]$ ifort -O2 intel-bug-20141014-file2.f90 intel-bug-20141014-file1.f90 && ./a.out
M=0 (expect M=2)
[U533534]$ ifort -O1 intel-bug-20141014-file2.f90 intel-bug-20141014-file1.f90 && ./a.out
M=2 (expect M=2)
[U533534]$
As soon as I can isolate the offending optimization, I'll report this to the developers.
Patrick
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Another workaround appears to be to introduce an explicit temporary array to hold the result of the COUNT reference, and then pass the temporary instead.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks for letting us know about that workaround. The bug is in the code generator. I've reported it to the developers (internal tracking ID DPD200362104). I'll keep this thread updated with any news.
Patrick
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
This issue is now targeted to be fixed in the 15.0 compiler.
Patrick
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
This is fixed in Composer XE2015 update #2, so I am closing this ticket now
[DPD200362104]$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.2.164 Build 20150121
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
[DPD200362104]$ ifort -c intel-bug-20141014-file2.f90
[DPD200362104]$ ifort -c intel-bug-20141014-file1.f90
[DPD200362104]$ ifort intel-bug-20141014-file1.o intel-bug-20141014-file2.o -o U533534.x
[DPD200362104]$ ./U533534.x
M=2 (expect M=2)
[DPD200362104]$
Patrick
