Skip to content

Commit fa30ccb

Browse files
Make sure code_typet is fully constructed
The existence of the parameters and return_type properties may depend on whether parameters() or return_type() has been called or not, which can lead to unexpectedly unequal instructions in goto programs.
1 parent 0a6c908 commit fa30ccb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/std_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,10 @@ class code_typet:public typet
760760
public:
761761
code_typet():typet(ID_code)
762762
{
763+
// make sure these properties are always there to avoid problems
764+
// with irept comparisons
765+
add(ID_parameters);
766+
add_type(ID_return_type);
763767
}
764768

765769
// used to be argumentt -- now uses standard terminology

0 commit comments

Comments
 (0)