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

Access violation in 11.1.038 when copying type containing an allocateable as well as type-bound procedures

thomas_boehme
New Contributor II
536 Views
I am getting access violations when Icopya type containing an allocatable as well as type-bound procedures and further fields after the allocatable.

The sample code below procudes a segmentation violation when executing the line A1 = A2. This does not happen when the field order in the type definition is changed such that the allocatable element comes last.
The code did not produce any errors in 11.1.035.

regards,
Thomas

[plain]module test
    TYPE :: A
        INTEGER, ALLOCATABLE :: IntAlloc
        REAL(8) :: val = 1.0
    CONTAINS
       PROCEDURE GetVal
    END TYPE
    
    CONTAINS
    REAL(8) FUNCTION GetVal( this )
        class(A), INTENT(IN)   :: this
        GetVal = this%val
    END FUNCTION    
end module

    program Console1
    USE test
    implicit none
    TYPE (A)    :: A1, A2
    A1 = A2
    end program Console1
[/plain]
0 Kudos
3 Replies
Steven_L_Intel1
Employee
536 Views
Thanks - I'll look into this.
0 Kudos
Steven_L_Intel1
Employee
536 Views
Issue ID is DPD200138087.
0 Kudos
Steven_L_Intel1
Employee
536 Views
This was fixed in 11.1 Update 2.
0 Kudos
Reply