{"action":"opened","issue":{"url":"https://api.github.com/repos/Z3Prover/z3/issues/488","repository_url":"https://api.github.com/repos/Z3Prover/z3","labels_url":"https://api.github.com/repos/Z3Prover/z3/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/Z3Prover/z3/issues/488/comments","events_url":"https://api.github.com/repos/Z3Prover/z3/issues/488/events","html_url":"https://github.com/Z3Prover/z3/issues/488","id":139006479,"number":488,"title":"src/test/model_evaluator.cpp does not build under gcc 5.3","user":{"login":"delcypher","id":511795,"avatar_url":"https://avatars.githubusercontent.com/u/511795?v=3","gravatar_id":"","url":"https://api.github.com/users/delcypher","html_url":"https://github.com/delcypher","followers_url":"https://api.github.com/users/delcypher/followers","following_url":"https://api.github.com/users/delcypher/following{/other_user}","gists_url":"https://api.github.com/users/delcypher/gists{/gist_id}","starred_url":"https://api.github.com/users/delcypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delcypher/subscriptions","organizations_url":"https://api.github.com/users/delcypher/orgs","repos_url":"https://api.github.com/users/delcypher/repos","events_url":"https://api.github.com/users/delcypher/events{/privacy}","received_events_url":"https://api.github.com/users/delcypher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-07T15:26:02Z","updated_at":"2016-03-07T15:26:02Z","closed_at":null,"body":"@NikolajBjorner I just told the CMake build to build ``src/test/model_evaluator.cpp`` that you added in 70f13ced3393cea570970b24d3d932d112183b9a and it won't compile under gcc 5.3.\r\n\r\n```\r\n[ 85%] Building CXX object src/test/CMakeFiles/test-z3.dir/model_evaluator.cpp.o\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp: In function ‘void tst_model_evaluator()’:\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:29:38: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n     expr_ref f01(m.mk_app(f, vI0, vB1), m);\r\n                                      ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:30:38: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n     expr_ref g01(m.mk_app(g, vI0, vB1), m);\r\n                                      ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:31:38: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n     expr_ref h01(m.mk_app(h, vI0, vB1), m);\r\n                                      ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:35:52: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n     hi->set_else(m.mk_ite(vB1, m.mk_app(f, vI0, vB1), m.mk_app(g, vI0, vB1)));\r\n                                                    ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:35:75: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n     hi->set_else(m.mk_ite(vB1, m.mk_app(f, vI0, vB1), m.mk_app(g, vI0, vB1)));\r\n                                                                           ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:45:89: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         fi->set_else(m.mk_ite(m.mk_exists(1, &sI, &nI, a.mk_le(vI0, m.mk_app(F, vI1, vB2))), vI0, a.mk_int(1)));\r\n                                                                                         ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:46:89: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         gi->set_else(m.mk_ite(m.mk_exists(1, &sI, &nI, a.mk_le(vI0, m.mk_app(G, vI1, vB2))), a.mk_int(2), vI0));\r\n                                                                                         ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:50:33: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         e = m.mk_app(h, vI0, vB1);\r\n                                 ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:56:42: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         fi->set_else(m.mk_app(F, vI0, vB1));\r\n                                          ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:57:42: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         gi->set_else(m.mk_app(G, vI0, vB1));\r\n                                          ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:61:33: error: call of overloaded ‘mk_app(func_decl_ref&, expr_ref&, expr_ref&)’ is ambiguous\r\n         e = m.mk_app(h, vI0, vB1);\r\n                                 ^\r\nIn file included from /home/dan/dev/klee/z3/src/src/model/model_core.h:22:0,\r\n                 from /home/dan/dev/klee/z3/src/src/model/model.h:22,\r\n                 from /home/dan/dev/klee/z3/src/src/test/model_evaluator.cpp:1:\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1673:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, unsigned int, const parameter*, unsigned int, expr* const*, sort*)\r\n     app * mk_app(family_id fid, decl_kind k, unsigned num_parameters = 0, parameter const * parameters = 0,\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1678:11: note: candidate: app* ast_manager::mk_app(family_id, decl_kind, expr*)\r\n     app * mk_app(family_id fid, decl_kind k, expr * arg);\r\n           ^\r\n/home/dan/dev/klee/z3/src/src/ast/ast.h:1758:11: note: candidate: app* ast_manager::mk_app(func_decl*, expr*, expr*)\r\n     app * mk_app(func_decl * decl, expr * arg1, expr * arg2) {\r\n           ^\r\nsrc/test/CMakeFiles/test-z3.dir/build.make:1301: recipe for target 'src/test/CMakeFiles/test-z3.dir/model_evaluator.cpp.o' failed\r\n```\r\n\r\nOne fix for this was to put ``static_cast<func_decl*>()`` around the ``func_decl_ref`` arguments you were passing to ``mk_app()`` however that didn't seem very elegant and I also wasn't sure if doing that screw up any reference counting mechanism you have. So I have left this for now."}}