- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is some example code:
program test_function_constructor implicit none abstract interface integer function get_int() end function get_int end interface type :: foo procedure(get_int), nopass, pointer :: get => null() end type foo type(foo) :: bar bar = foo(foo_int) ! Causes ICE bar%get => foo_int ! OK (my current workaround) contains integer function foo_int() foo_int = 0 end function foo_int end program test_function_constructor
There was a previous bug about a similar issue here:
http://software.intel.com/en-us/forums/topic/270982
That bug was fixed and the test case there still is OK. This new bug triggers in different circumstances. Namely:
- The type being constructed must be declared in the same module (or as above, program block) as the code that uses the constructor.
- The procedure pointer must point to a function, not a subroutine.
If either of those conditions isn't met, the code compiles fine. Unlike the earlier issue, it doesn't matter in this case if you default-initialize the function pointer to null().
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this error and for the convenient test case. I reproduced the error and reported it to Developers (see internal tracking id below). I will keep the post updated on the status of a fix as I learn it.
(Internal tracking id: DPD200255193)
(Resolution Update on 11/17/2014): This defect is fixed in the Intel® Parallel Studio XE 2015 Update 1 release (2015.0.133 - Linux)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This defect is fixed in the Intel® Parallel Studio XE 2015 Update 1 release (Version 15.0.1.133 Build 20141023 - Linux) now available from our Intel® Registration Center.
![](/skins/images/2E08A100FB92911314A240D1EAFB2828/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page