Skip to content

Refine float-integer casts in BaseInvariant #1632

Open
@sim642

Description

@sim642

PR #1519 originally tried to handle this from SV-COMP:

int64_t data;
if (data > (-0x7fffffffffffffff - 1) && imaxabs((intmax_t)data) <= sqrtl(0x7fffffffffffffffLL))
{
int64_t result = data * data; // TODO NOWARN

The fix involved BaseInvariant refinement of float-integer casts in a possibly incorrect way, so it was reverted in #1519. However, it should still be possible to implement sound refinement of such casts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions