Using ifort (IFORT) 19.1.0.075 20190522 beta, the following generates a catastrophic error:
integer, dimension(2,2) :: y = reshape ([1,2,3,4],[2,2])
integer, dimension(4) :: z = [1,2,3,4]
integer :: i = 42
call foo(y, "y")
print '(a, 4i4)', "Return value of y = ", y
call foo(z, "z")
call foo(i, "i")
print '(a, i2)', "Return value of i = ", i
subroutine foo(w, chr)
integer, dimension(..) :: w
character(1) :: chr
select rank (x => w)
print '(a, 2i2)', chr//"(1,:) = ", x(1,:)
print '(a)', chr//" rank 2"
x = reshape ([10,11,12,13], [2,2])
print '(a,i2)', chr//" = ", x
print '(a)', chr//" rank 0"
x = 5
print '(a, 4i4)', chr//"(1,:) = ", x(1:4)
print '(a)', chr//" is assumed size"
select rank (x)
print '(a, 4i4)', chr//"(1,:) = ", x
integer, dimension(*) :: x
call foo(x, "w")
test.f90(27): 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)
The line number is correct. The SELECT RANK following RANK DEFAULT is the cause of the problem. As far as I can tell from the F2018 standard it should be OK. Removing the inner SELECT RANK gives the expected result.
Strangely, replacing the offending block with:
! print'(a, i4)', chr//" is default. Rank = ", rank(x)
call foo (x, "q")
the test compiles OK and outputs:
q(1,:) = 1012
q rank 2
Uncommenting the PRINT statement causes a segfault.
If you would please, could you submit a bug (using the orange button at the top of this page) so we can get this appropriately installed in our bugreport system?
Thank you! --
I looked everywhere on the site to find out how to submit a bug report rather than posting on this forum but failed to figure it out. Please accept my apologies.
At the top of the main forum page is a big orange Bug Report button. There's also the "Tech Support" link up there, but the button gets you there directly.
Paul, to see the Big Red button, you should be on the Fortran for Windows page with the list of topics -- not reading your own thread. For your convenience, here is the link: http://www.intel.com/supporttickets .