On *-apple-darwin9 with gfortran 4.5.0 or 4.4.1, the following code gives at
-O2:

! { dg-do compile }
subroutine foo
  implicit none

  integer :: i

  call gee_i(int(i**huge(0_8),kind=kind(i)))
!  call gee_i(int(i**(-huge(0_8)-1_8),kind=kind(i)))

end subroutine foo

gives at -O2:

[ibook-dhum] f90/bug% time gfc -O2 integer_exponentiation_2_db_red.f90
virtual memory exhausted: Cannot allocate memory
28.270u 4.114s 1:27.92 36.8%    0+0k 0+11io 282pf+0w

The code compiles with values other than huge(0_8) or with gfortran 4.3.


-- 
           Summary: [4.4/4.5 Regression] virtual memory exhausted: Cannot
                    allocate memory
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: *-apple-darwin9
  GCC host triplet: *-apple-darwin9
GCC target triplet: *-apple-darwin9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41043

Reply via email to