2024-11-23 20:32 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000449mercuryBugpublic2018-02-13 12:55
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000449: Switches on uint64s not working in java grade
DescriptionThe test case tests/hard_coded/uint64_switch_test fails in the Java grade
due to the generate code trying to perform a switch on a long value, which
Java doesn't support.
Steps To ReproduceMERCURY_OPTIONS=
gmake[3]: Entering directory `/mnt/opturion/jfischer/mercury-5.git/tests/hard_coded'
{ echo MCFLAGS += '--grade java --options-file /mnt/opturion/jfischer/mercury-5.git/stage2/Mercury.options --mercury-linkage static --flags ../TESTS_FLAGS --flags ../WS_FLAGS --use-subdirs '; echo MCFLAGS += ' '; echo CFLAGS += ' '; echo JAVACFLAGS += '-J"-Xmx1024m" '; echo CSCFLAGS += ' '; echo C2INITARGS += ' /mnt/opturion/jfischer/mercury-5.git/stage2/library/mer_std.init /mnt/opturion/jfischer/mercury-5.git/stage2/runtime/mer_rt.init '; echo MLLIBS += ' '; echo MLOBJS += ' '; echo LDFLAGS += ' '; echo LD_LIBFLAGS += ' '; echo EXTRA_LIBRARIES += ''; echo EXTRA_LIB_DIRS += ''; echo LIBGRADES = 'asm_fast.gc csharp erlang hlc.gc java '; echo INSTALL_PREFIX = '/mnt/opturion/jfischer/test-from-bytes'; echo LINKAGE = 'shared'; echo MERCURY_LINKAGE = 'shared'; } | /mnt/opturion/jfischer/mercury-5.git/stage2/scripts/mmc --make --options-file - uint64_switch_test.depend
gmake[3]: Leaving directory `/mnt/opturion/jfischer/mercury-5.git/tests/hard_coded'
gmake[3]: Entering directory `/mnt/opturion/jfischer/mercury-5.git/tests/hard_coded'
{ echo MCFLAGS += '--grade java --options-file /mnt/opturion/jfischer/mercury-5.git/stage2/Mercury.options --mercury-linkage static --flags ../TESTS_FLAGS --flags ../WS_FLAGS --use-subdirs '; echo MCFLAGS += ' '; echo CFLAGS += ' '; echo JAVACFLAGS += '-J"-Xmx1024m" '; echo CSCFLAGS += ' '; echo C2INITARGS += ' /mnt/opturion/jfischer/mercury-5.git/stage2/library/mer_std.init /mnt/opturion/jfischer/mercury-5.git/stage2/runtime/mer_rt.init '; echo MLLIBS += ' '; echo MLOBJS += ' '; echo LDFLAGS += ' '; echo LD_LIBFLAGS += ' '; echo EXTRA_LIBRARIES += ''; echo EXTRA_LIB_DIRS += ''; echo LIBGRADES = 'asm_fast.gc csharp erlang hlc.gc java '; echo INSTALL_PREFIX = '/mnt/opturion/jfischer/test-from-bytes'; echo LINKAGE = 'shared'; echo MERCURY_LINKAGE = 'shared'; } | /mnt/opturion/jfischer/mercury-5.git/stage2/scripts/mmc --make --options-file - uint64_switch_test
Making Mercury/int3s/uint64_switch_test.int3
Making Mercury/ints/uint64_switch_test.int
Making Mercury/javas/jmercury/uint64_switch_test.java
Making Java class files
Mercury/javas/jmercury/uint64_switch_test.java:133: error: incompatible types: possible lossy conversion from long to int
        switch (Value_6) {
               ^
Note: Mercury/javas/jmercury/uint64_switch_test.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000963

juliensf (administrator)

Not a limitation shared by C#, so this only affects the Java grade.

~0000964

juliensf (administrator)

Fixed in commit 63572bc.
+Notes

-Issue History
Date Modified Username Field Change
2018-02-09 10:23 juliensf New Issue
2018-02-09 10:23 juliensf Status new => assigned
2018-02-09 10:23 juliensf Assigned To => juliensf
2018-02-09 10:30 juliensf Note Added: 0000963
2018-02-13 12:55 juliensf Status assigned => resolved
2018-02-13 12:55 juliensf Resolution open => fixed
2018-02-13 12:55 juliensf Note Added: 0000964
+Issue History