Bug: Fatal error in iropt
Hi,
While compiling our code Octopus, I found a bug in the sun studio express fortran compiler (in x86 linux and sparc solaris). I made a bug report, but in that moment I wasn't able to reduce the file to a single file and in the bug report and I gave a pointer to our svn repository.
Now I was able to reduce the bug to a single subroutine and I would like to modify the report, but I couldn't find how to do it. My Review ID is 944794. Shall I submit a new bug report? As I will commit a workaround, my report will not be valid.
In any case I post here the code that triggers the bug, it appears when optimizations level is 3 or greater. The error is:
iropt: ../src/sr.c:8153: af_create_ir_node: Assertion `af->type == AF_NODE' failed.
f95: Fatal error in iropt: Aborted
[code]
subroutine sub(domain)
implicit none
integer :: no_f, i, last, grouplength, ii, domain
integer, parameter :: filter_freq = 1
grouplength = 0
i = 1
no_f = 10
do ii = 1, no_f
if(domain .eq. filter_freq) then
grouplength = grouplength + 1
end if
last = i + grouplength
end do
print*, last
end subroutine sub
[/code]
Removing the 'last = ...' statement of the loop or removing the 'print*... ' sentence the bug dissapears.
By the way, I am quite impressed with the perfomance of the sun studio compiler. I made some preliminary tests in x86 and for our code it seems to be faster than any other compiler.

