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

compiler error in associate statement

Juan_Pablo_S_1
Beginner
391 Views

I get an internal compiler error with the following code. 

[fortran]

program main
implicit none
integer,dimension(3) :: a
integer,dimension(4,4) :: b

a=(/1,2,4/)
associate(p=>b(:,a))
end associate
end program[/fortran]

On the other hand, I get no compilation errors with this other code:

[fortran]program main
implicit none
integer,dimension(4,4) :: b

associate(p=>b(:,1:2:4))
end associate
end program[/fortran]

What am I missing here?*

* compiled with ifort version 13.0.1 under linux mint 14

0 Kudos
2 Replies
Steven_L_Intel1
Employee
391 Views

An internal compiler error is always a compiler bug. Thanks for the short example - I will send this to the developers.

The issue ID is DPD200240855. You probably already know this, but in an ASSOCIATE constructor when the selector is an array with a vector subscript, you cannot assign to or otherwise "define" the associate-name. Your example doesn't do this (indeed it doesn't do anything inside the construct), but I figured I'd mention it anyway.

0 Kudos
Steven_L_Intel1
Employee
391 Views

This has been fixed for a release later this year.

0 Kudos
Reply