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

CLASS(*) access violation

MDK
Beginner
417 Views
[fortran]program crash
    
    implicit none
    
    class(*), pointer :: any => null()
    integer, target :: int = -1
    
    any => int  ! access violation (?)

end program[/fortran]

This seems to be a new problem with 11.1.054. Any attempt to do anything with a CLASS(*) variable results in an access violation. This includes fundamental activities such as assigning a pointer target (see above) or calling ALLOCATED()/ASSOCIATED() with a CLASS(*) variable. This makes it impossible to use CLASS(*) variables at all.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
417 Views

I can reproduce the problem you describe here. It was working in Update 2 (11.1.048) but broke in Update 3 (11.1.051). It appears that we have this fixed already for the upcoming Update 5.

A workaround is to disable Diagnostics > Check Routine Interfaces. and Diagnostics > Generate Interface Blocks.

0 Kudos
Reply