View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000449 | mercury | Bug | public | 2018-02-09 10:23 | 2018-02-13 12:55 | ||||
Reporter | juliensf | ||||||||
Assigned To | juliensf | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000449: Switches on uint64s not working in java grade | ||||||||
Description | The 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 Reproduce | MERCURY_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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
juliensf (administrator) 2018-02-09 10:30 |
Not a limitation shared by C#, so this only affects the Java grade. |
juliensf (administrator) 2018-02-13 12:55 |
Fixed in commit 63572bc. |
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 |