Mantis - Cafesterol
|
|||||
Erweiterte Problemanzeige | |||||
|
|||||
ID: | Kategorie: | Auswirkung: | Reproduzierbar: | Meldungsdatum: | Letzte Aktualisierung: |
14 | general | schwerer Fehler | immer | 2008-06-26 19:21 | 2008-06-27 16:51 |
|
|||||
Reporter: | anonymous | Rechnertyp: | |||
Bearbeitung durch: | xclerc | Betriebssystem: | |||
Priorität: | normal | BS-Version: | |||
Status: | erledigt | Produktversion: | 1.0 | ||
Produkt-Build: | Lösung: | erledigt | |||
Projektion: | keine | ||||
Aufwand: | keine | Behoben in Version: | 1.0 | ||
|
|||||
Zusammenfassung: | 0000014: float array literals produce zero-length arrays | ||||
Beschreibung: |
Array expressions like [| x |] or [| x ; x |], where x is a float variable, produce a zero-length array. Array expressions with other element types work as expected. Array expressions with floating-point literals like [| 1.0 |] work as well. |
||||
Schritte zur Reproduktion: | |||||
Zusätzliche Information: |
$ cat arraybug.ml let singleton_literal x = [| x |] let singleton_array_make x = Array.make 1 x let test singleton x = Printf.printf " %d" (Array.length (singleton x)) let () = test singleton_literal 1; test singleton_array_make 1; test singleton_literal 1.0; test singleton_array_make 1.0; print_newline () $ ocamljava -standalone -o arraybug.jar arraybug.ml $ java -jar arraybug.jar 1 1 0 1 $ ocamlopt -o arraybug.opt arraybug.ml $ ./arraybug.opt 1 1 1 1 $ java -version java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) $ ocamljava -config version (ocaml): 3.10.2 version (cafesterol): 1.0 standard_library: /usr/local/lib/ocaml standard_runtime: /usr/local/bin/ocamlrun ccomp_type: javac architecture: Java model: JVM 1.5+ ext_obj: .jo ext_lib: .jar default_executable_name: camlprog.jar systhread_supported: true $ ocamlopt -config version: 3.10.2 standard_library_default: /usr/local/lib/ocaml standard_library: /usr/local/lib/ocaml standard_runtime: /usr/local/bin/ocamlrun ccomp_type: cc bytecomp_c_compiler: gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC bytecomp_c_linker: gcc -Wl,-E bytecomp_c_libraries: -lm -ldl -lcurses -lpthread native_c_compiler: gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT native_c_linker: gcc native_c_libraries: -lm -ldl native_partial_linker: ld -r ranlib: ranlib cc_profile: -pg architecture: i386 model: default system: linux_elf ext_obj: .o ext_asm: .s ext_lib: .a ext_dll: .so os_type: Unix default_executable_name: a.out systhread_supported: true |
||||
Problem-Beziehungen | |||||
Angehängte Dateien: | |||||
|
|||||
Problem-Historie | |||||
Änderungsdatum | Benutzername | Feld | Änderung | ||
2008-06-26 19:21 | anonymous | Neues Problem | |||
2008-06-27 16:51 | xclerc | Status | neu => erledigt | ||
2008-06-27 16:51 | xclerc | Behoben in Version | => 1.0 | ||
2008-06-27 16:51 | xclerc | Lösung | offen => erledigt | ||
2008-06-27 16:51 | xclerc | Bearbeitung durch | => xclerc | ||
2008-06-27 16:51 | xclerc | Problemnotiz hinzugefügt: 0000010 |
Notiz | |||||
|
|||||
|
|