Copying arrays with only unbound records as elements causes DTE
Submitted by Botond Baranyi
Link to original bug (#494614)
Description
Example code: TTCN module: type record Rec { integer num, charstring str }
type record of Rec RoRec;
modulepar RoRec mp_rorec;
testcase TC1() runs on sample_CT { var RoRec v1 := {{}}; var RoRec v2 := v1; v2[0].num := 10; // no error var RoRec x := mp_rorec; x[0].num := 11; // dynamic test case error }
Cfg file: [MODULE_PARAMETERS] mp_rorec := {{}}
When using variables, no error occurs, because v2[0] is optimized out (it's a null pointer instead of an unbound record).
In case of module parameters, an unbound record is created, which causes an error when copied.
Suggestion: The unbound array element should be optimized out in case of module parameters, too.
Version: 5.5.0