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

Missing parentheses in procedure call triggers internal compiler error

johnyb_
New Contributor I
201 Views

This is the most reduced test case i could come up with:

module T
   
    type T_1
        integer, allocatable :: tab(:)
    contains
        procedure   :: isize
    end type

    contains

        integer function isize(this)
            class(T_1), intent(in) :: this
            isize = size(this%tab)
        end function
        
        subroutine check(this)
            class(T_1), intent(in) :: this
            integer,allocatable :: temp(:)
            
            if ( this%isize() >=1) then
                allocate(temp(1:this%isize ))
            endif
        end subroutine

end module

When this is compiled with it gives:

C:\TEMP>ifort test.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.1.146 Build 20151021
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

test.f90(21): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for test.f90 (code 1)

C:\TEMP>

The problem are the missing parentheses in this%isize in the allocate statement. 

0 Kudos
1 Reply
Kevin_D_Intel
Employee
201 Views

Thank you very much for the convenient reproducer. I can reproduce this error using our current 16.0 Update 1 (as your showed) and with our current internal development compiler. I will escalate this to Development.

(Internal tracking id: DPD200382005)

0 Kudos
Reply