Opened 9 years ago

Closed 9 years ago

#871 closed bug (duplicate)

compiler bug concerning arrays

Reported by: guest Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 6.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

It seems that ghc always gives up when an array is built using listArray
while the size of the given range is larger than the length of the list
and the range and the list are big enough.

The following is an example; it was created under SuSE 9.3:

nestra@linux:~/kodu/mat/inf/p/d/f/fpm/materjal/Tyybid> ghci -v
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Using package config file: /usr/lib/ghc-6.4.2/package.conf
Hsc static flags: -static
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package base-1.0 ... linking ... done.
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Prelude> :m Array
Prelude Array> listArray (0 , maxBound :: Int) (replicate (2 ^ 22) 0)
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
array <interactive>: internal error: evacuate: strange closure type 16540
    Please report this as a compiler bug.  See:
    http://www.haskell.org/ghc/reportabug

In the same case, Hugs gives a message "array index out of range".

Change History (1)

comment:1 Changed 9 years ago by simonmar

  • Component changed from Compiler to libraries/base
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of bug #229.

Note: See TracTickets for help on using tickets.