Skip to content

Commit

Permalink
Make sure code_typet is fully constructed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
peterschrammel committed Jun 5, 2018
1 parent 61b9647 commit 63a5131
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/std_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@ class code_typet:public typet
public:
code_typet():typet(ID_code)
{
// make sure these properties are always there to avoid problems
// with irept comparisons
add(ID_parameters);
add_type(ID_return_type);
}

// used to be argumentt -- now uses standard terminology
Expand Down

0 comments on commit 63a5131

Please sign in to comment.