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

INTERNAL COMPILER ERROR: allocatable and contiguous arguments in submodule implmenetation

DataScientist
Valued Contributor I
461 Views

Intel ifort 2021.4 cannot compile the following module and submodule, where the procedure interface is separated from the implementation.

 

module lower_bound

    interface lower
        module subroutine test_lower(array, indices)
            integer, intent(inout), allocatable :: array(:)
            integer, intent(in), contiguous     :: indices(lbound(array,1):)
        end subroutine test_lower
    end interface

end module lower_bound
submodule (lower_bound) smod

contains

    module procedure test_lower
    end procedure

end submodule smod

 

Note that the issue appears to be entirely due to the specification of the lower bound for the input argument INDICES: indices(lbound(array,1):).

Given the nature of the error message:

 

catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.

 

this appears to be a compiler bug unless someone can prove it otherwise.

To reproduce the bug, compile with

 

ifort lower_bound.f90 lower_bound@smod.f90 -c

 

gfortran 10.3 has no problem compiling and running the code.

 

 

0 Kudos
1 Solution
Ron_Green
Moderator
435 Views

yes, definitely a bug.  We will create a bug report.  Thank you for sending this in, timely too since I'm reviewing open issues against submodules.  it's been one of my interest areas.

 

ron

View solution in original post

3 Replies
Ron_Green
Moderator
436 Views

yes, definitely a bug.  We will create a bug report.  Thank you for sending this in, timely too since I'm reviewing open issues against submodules.  it's been one of my interest areas.

 

ron

Devorah_H_Intel
Moderator
422 Views

This has been escalated to engineering CMPLRIL0-34555 

Thanks for reporting the issue. 

DataScientist
Valued Contributor I
416 Views

fantastic, Thank you.

0 Kudos
Reply