Skip to content

Commit f84d96b

Browse files
authored
Merge pull request #1048 from allredj/fix-for-platform-975
Fix bad return type of char pointer func
2 parents cf0875a + 5323702 commit f84d96b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/solvers/refinement/string_constraint_generator_main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,12 @@ exprt string_constraint_generatort::add_axioms_for_char_pointer(
534534
{
535535
exprt char_pointer=args(fun, 1)[0];
536536
if(char_pointer.id()==ID_index)
537-
return char_pointer.op0();
537+
return typecast_exprt(char_pointer.op0(), fun.type());
538+
// TODO: It seems reasonable that the result of the function application
539+
// should match the return type of the function. However it is not
540+
// clear whether this typecast is properly handled in the string
541+
// refinement. We need regression tests that use that function.
542+
538543
// TODO: we do not know what to do in the other cases
539544
assert(false);
540545
return exprt();

0 commit comments

Comments
 (0)