! Interesting bug of the Intel fortran compiler 9.1
! Build 20060706Z, 32 bit, running on Linux

! The bug appears if quad precision is selected and a power with
! negative integer exponent is calculated.
! There is no problem with -O0 or -O1 optimizations, only with -O2.

program fancybug
integer, parameter :: wp= selected_real_kind(20)
real(wp) :: x
x= inver(4.0_wp)

contains

function inver(this) result (that)
real(wp), intent(in) :: this
real(wp) :: that
that=this**(-1)  ! No problem with -1.0 and with -1.0_wp as exponent
end function inver

end program fancybug

! Compiler's details
! $ ifort -V
! Intel(R) Fortran Compiler for 32-bit applications, Version 9.1    Build 20060706Z Package ID: <installpackageid>
! Copyright (C) 1985-2006 Intel Corporation.  All rights reserved.
! FOR NON-COMMERCIAL USE ONLY

! Error message:
!
! 0_1
! 
! fortcom: Severe: **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 intel_fancybug.f90 (code 3)

