anonym | Anmelden | Neues Konto anmelden | 2022-08-09 02:09 UTC |
Startseite | Übersicht | Probleme anzeigen | Änderungsprotokoll | Roadmap | Dokumentation | Konto |
Erweiterte Problemanzeige [ Zu Notizen wechseln ] | [ einfache Anzeige ] [ Problem-Historie ] [ Drucken ] | ||||||
ID | Kategorie | Auswirkung | Reproduzierbar | Meldungsdatum | Letzte Aktualisierung | ||
0000014 | [Cafesterol] general | schwerer Fehler | immer | 2008-06-26 19:21 | 2008-06-27 16:51 | ||
Reporter | anonymous | Anzeigestatus | öffentlich | ||||
Bearbeitung durch | xclerc | ||||||
Priorität | normal | Lösung | erledigt | Rechnertyp | |||
Status | erledigt | Betriebssystem | |||||
Projektion | keine | BS-Version | |||||
Aufwand | keine | Behoben in Version | 1.0 | Produktversion | 1.0 | ||
Zielversion | Produkt-Build | ||||||
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 |
||||||
Tags | Keine Tags zugeordnet. | ||||||
Angehängte Dateien | |||||||
|
Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |