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

buggy coarray element assignment for derived type with allocatable component

Alexis_R_
New Contributor I
474 Views

I have seen a couple of similar bug reports on the forum, but not sure this is identical, so here goes.

With ifort 14.0.1.106 using -assume realloc_lhs, the following code gives a segfault at line 12, which looks to me like a compiler bug.

[fortran]module my_class_module
    type my_type
        real, allocatable :: arr(:,:)
        contains
        procedure :: my_assignment
        generic :: assignment(=) => my_assignment
    end type
    contains
    subroutine my_assignment(lhs,rhs)
        class(my_type),  intent(inout) :: lhs
        type(my_type),  intent(in)    :: rhs
        lhs%arr = rhs%arr
    end subroutine
end module

program hello
    use my_class_module
    type(my_type)           ::  c
  • allocate(c%arr(2,2)) c%arr = 0.0 if (this_image() .gt. 1) c%arr = c[1]%arr ! this is ok if (this_image() .gt. 1) c = c[1] ! this line triggers a segfault end program[/fortran]
  •  

    0 Kudos
    7 Replies
    Alexis_R_
    New Contributor I
    474 Views

    Is this the same issue as DPD200247881 reported in this thread?

    May we expect a fix in the next minor release?

    0 Kudos
    Alexis_R_
    New Contributor I
    474 Views

    I would appreciate a comment from someone at Intel. I suspect this is a bug in the Intel compiler's coarray implementation, in which case I'd appreciate an issue number I can track.

    0 Kudos
    Kevin_D_Intel
    Employee
    474 Views

    Please accept our apologies for overlooking your earlier post. It could be related to DPD200247881. The fix for the earlier issue noted in that other post is in the upcoming major release later this year but it does not address your issue or the later issue Steve captured in the internal tracking number you noted.

    I submitted your case to Development under a separate tracking id (noted below) so it can be analyzed separately and will let you know what information I receive from Development regarding your case.

    (Internal tracking id: DPD200255059)

    0 Kudos
    Alexis_R_
    New Contributor I
    474 Views

    Has a fix for DPD200255059 been found? If so, which release is it targeted for?

    0 Kudos
    Alexis_R_
    New Contributor I
    474 Views

    I note that DPD200255059 is not listed in the XE2015 Update 1 list of fixes. Any other updates on this issue?

    0 Kudos
    Kevin_D_Intel
    Employee
    474 Views

    My apologies. I wasn't aware of your inquiry back in August.

    That defect has not yet been fixed. Shortly after submitting the Developers indicated it may take some digging to get to the bottom of this one. I did inquire whether there's any current status and will share that with you if there is anything new.

    0 Kudos
    Kevin_D_Intel
    Employee
    474 Views

    The Developer said it is on the radar, that they have investigated further and expect fixing it requires significant work and thus time. I will keep you updated.

    0 Kudos
    Reply