"select case" with many branches

Hi,

I want to compile a Fortran code including “select case” with many branches, e.g.

module TEST
contains

subroutine LIB__Set( id )
implicit none
integer, intent(in) :: id

select case (id)
case (1)
case (2)
case (3)
...
case (9998)
case (9999)
case (10000)
case default
  stop
end select

end subroutine LIB__Set

end module TEST

Compiling the above code, I met an error message:
pgfortran-Fatal-f901 completed with exit code 128

Are there any pgfortran options to compile such a code with many branches?

Regards,
Tetsuo

Hi Tetsuo,

This is a pathological case where the compiler is taking an extremely long time to compile the code with optimization. Most likely in your case, the compiler is getting killed. To compile this file, you can not use optimization (i.e. compile with -O0).

I have send a report (TPR#18011) to our engineers for further investigation.

Thanks,
Mat