Skip to content

Postconditions on floating point types always fail #4

Open
@PeterBindels-TomTom

Description

@PeterBindels-TomTom

Reproducer:

double f() post(r: r <= 5) {
    return 0;
}

int main() {
    f();
}```

with optimization turned to at least -O1, turns the function into a "contract always fails". Inverting the condition (making it always fail) results in the same result (but the opposite operator in the IR). 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions