Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29618 Diskussionen

Polymorphic function with array result

IanH
Geehrter Beitragender III
1.809Aufrufe
Apologies if this has already been covered with the previous posts about 11.1 on this forum.

The attached program demonstrates an issue with polymorphic function calls that have array results. I'd expect both the subroutine and the function to return two. When compiled using 11.1.038 with /check:all /warn:all the subroutine is ok, but the function path returns 1310184. I think the stack gets toasted, because in a larger program all hell breaks loose after a similar function call.

If my F2003 understanding is at fault please correct me!

Thanks,

IanH
0 Kudos
3 Antworten
reinhold-bader
Neuer Beitragender II
1.809Aufrufe
Quoting - IanH
Hello,

I think your source code is OK; checking with two other compilers confirmed this.
Regards
Reinhold

Steven_L_Intel1
Mitarbeiter
1.809Aufrufe
Yes, it seems that the array-valued type-bound procedure is not returning its value correctly. I will report this to the developers. Issue ID is DPD200139698.
Steven_L_Intel1
Mitarbeiter
1.809Aufrufe
This problem appears to be fixed in 11.1 Update 3, though it doesn't appear on the list of fixes. I think that's an oversight as the developer fixed the bug in September.
Antworten