Skip to content

Commit 9c4d2df

Browse files
committed
goto-synthesizer: correctly configure the C front-end
goto-synthesizer will eventually invoke code that parses C code (for example, the model library), which in turn requires correct configuration to support _Float16. (For other tools this was previously done in b2b2734.)
1 parent 9be731d commit 9c4d2df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/goto-synthesizer/goto_synthesizer_parse_options.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Author: Qinheping Hu
1616
#include <goto-programs/set_properties.h>
1717
#include <goto-programs/write_goto_binary.h>
1818

19+
#include <ansi-c/gcc_version.h>
1920
#include <goto-instrument/contracts/contracts.h>
2021
#include <goto-instrument/nondet_volatile.h>
2122

@@ -52,6 +53,14 @@ int goto_synthesizer_parse_optionst::doit()
5253
if(result_get_goto_program != CPROVER_EXIT_SUCCESS)
5354
return result_get_goto_program;
5455

56+
// configure gcc, if required -- get_goto_program will have set the config
57+
if(config.ansi_c.preprocessor == configt::ansi_ct::preprocessort::GCC)
58+
{
59+
gcc_versiont gcc_version;
60+
gcc_version.get("gcc");
61+
configure_gcc(gcc_version);
62+
}
63+
5564
// Synthesize loop invariants and annotate them into `goto_model`
5665
enumerative_loop_contracts_synthesizert synthesizer(goto_model, log);
5766
const auto &invariant_map = synthesizer.synthesize_all();

0 commit comments

Comments
 (0)