Empty record actual parameter produces fatal error
Submitted by Botond Baranyi
Link to original bug (#498337)
Description
Passing an empty record value as a function's actual parameter causes the compiler to crash with fatal error during code generation.
Example code: type record Rec { integer num, charstring str }
function f(in Rec x) { log(x); }
control { f( {} ); }
Result: FATAL ERROR: /home/ebotbar/git/titan.core/Install/bin/compiler: In line 11348 of Value.cc: Value::generate_code_expr(34)
If a set is used instead of the record, then the error is correctly caught during semantic analysis: error: A non-empty set value was expected for type `@MyModule.Rec'
Solution: The invalid parameter should be caught during semantic analysis (like with sets).
Version: 5.5.0