Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions regression/cbmc/Float24/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
int main()
{
double d=5.1;
__CPROVER_assert(0, "");
return 0;
}
10 changes: 10 additions & 0 deletions regression/cbmc/Float24/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
main.c
--win32 --xml-ui
^EXIT=10$
^SIGNAL=0$
VERIFICATION FAILED
<full_lhs_value>5\.1</full_lhs_value>
--
^warning: ignoring
<full_lhs_value>5\.1l</full_lhs_value>
3 changes: 2 additions & 1 deletion src/ansi-c/expr2c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,8 @@ std::string expr2ct::convert_constant(
// ANSI-C: double is default; float/long-double require annotation
if(src.type()==float_type())
dest+='f';
else if(src.type()==long_double_type())
else if(src.type()==long_double_type() &&
double_type()!=long_double_type())
dest+='l';
}
else if(dest.size()==4 &&
Expand Down