diff --git a/Regression_Test_java/single_main.cfg b/Regression_Test_java/single_main.cfg
index 8c7d6c9320017ab08adb84e8f2afb5108a89d2d3..5b01bc006b3629189ff8ecaa5d282ea616cbcf68 100644
--- a/Regression_Test_java/single_main.cfg
+++ b/Regression_Test_java/single_main.cfg
@@ -257,6 +257,8 @@ Test.control
 HS16977_Test.control
 #RAW/IntX
 IntX.control #ok! 6 pass
+#RAW/Issue555
+Issue555.control
 #RAW/Lengthto_Offset:
 Lengthto_Offset
 #RAW/RAW_bitstring_test:
diff --git a/Regression_Test_java/src/EncodeDecode/RAW/Issue555/Issue555.ttcn b/Regression_Test_java/src/EncodeDecode/RAW/Issue555/Issue555.ttcn
new file mode 100644
index 0000000000000000000000000000000000000000..836ecacdccae3ec6dd1382f11b2894a23ad3bdf5
--- /dev/null
+++ b/Regression_Test_java/src/EncodeDecode/RAW/Issue555/Issue555.ttcn
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * Copyright (c) 2000-2021 Ericsson Telecom AB
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+ *
+ * Contributors:
+ *   Gabor, Szalai – initial implementation
+ *
+ ******************************************************************************/
+
+module Issue555 {
+
+
+type record MyRec{
+  MCC       mcc,
+  bitstring bs length(4)
+} with {
+  variant "FIELDORDER(msb)"
+}
+
+type hexstring MCC
+with {
+  variant "FIELDLENGTH (3)";
+  variant "FIELDORDER(msb)"
+  variant "HEXORDER (high)";
+}
+
+type component CT {}
+
+template MyRec t_hex:={
+  mcc:='042'H,
+  bs:='0000'B
+}
+
+testcase tc_issue555() runs on CT {
+  var bitstring bdata:='0000010000100000'B
+  var MyRec res
+  var integer i:=decvalue(bdata,res)
+  log(i)
+  if(i!=0){
+    setverdict(fail, "decvalue failed")
+  } else {
+    log(res)
+    if(match(res,t_hex)){
+      setverdict(pass)
+    } else {
+      setverdict(fail, "unmatched value")
+    }
+  }
+}
+
+control {
+  execute(tc_issue555());
+}
+
+} with {
+  encode "RAW"
+}
diff --git a/Regression_Test_java/src/EncodeDecode/RAW/Issue555/config.cfg b/Regression_Test_java/src/EncodeDecode/RAW/Issue555/config.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..b3fe903f79d40a653419eb475ea9b3151b123450
--- /dev/null
+++ b/Regression_Test_java/src/EncodeDecode/RAW/Issue555/config.cfg
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2000-2021 Ericsson Telecom AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+#
+# Contributors:
+#   Botond, Baranyi
+#
+###############################################################################
+[LOGGING]
+LogFile := "Issue555.log"
+FileMask := LOG_ALL
+ConsoleMask := TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
+LogSourceInfo := Yes
+[EXECUTE]
+Issue555.control
+
+[TESTPORT_PARAMETERS]