Files
mercury/tests/hard_coded/tautological_compare.exp
Peter Wang 1d57550d2f Simplify away self-comparisons of variables of int types.
Newer versions of gcc and clang may warn about comparison of a variable
to itself that always evaluate to true or false, breaking builds in
which warnings are treated as errors.

compiler/simplify_goal_call.m:
    Replace calls to comparison predicates < > =< >= of int types in
    which both arguments are the same variable with 'true' or 'false'
    goals.

    Replace calls to builtin.compare/3 where the compared arguments are
    the same variable with a goal that assigns (=) as the comparison
    result.

    Factor out common simplifications to all int types.

tests/hard_coded/Mmakefile:
tests/hard_coded/tautological_compare.m:
tests/hard_coded/tautological_compare.exp:
    Add new test case.

tests/typeclasses/typeclass_exist_method.m:
    Revert now-unnecessary workaround.
2018-10-23 18:58:36 +11:00

73 lines
239 B
Plaintext

int:
ok
ok
ok
ok
uint:
ok
ok
ok
ok
int8:
ok
ok
ok
ok
uint8:
ok
ok
ok
ok
int16:
ok
ok
ok
ok
uint16:
ok
ok
ok
ok
int32:
ok
ok
ok
ok
uint32:
ok
ok
ok
ok
int64:
ok
ok
ok
ok
uint64:
ok
ok
ok
ok
compare:
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok