- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting the issue and for attaching the files. We'll investigate and follow up.
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is now targeted to be fixed in the 15.0 compiler.
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

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