https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108447
Bug ID: 108447 Summary: [13 Regression] glibc math/test-*-iseqsig failures Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: missed-optimization, wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: aldyh at gcc dot gnu.org, amacleod at redhat dot com, bergner at gcc dot gnu.org, danglin at gcc dot gnu.org, fw at gcc dot gnu.org, jsm28 at gcc dot gnu.org, rguenth at gcc dot gnu.org, romain.geissler at amadeus dot com, seurer at gcc dot gnu.org, unassigned at gcc dot gnu.org, xry111 at gcc dot gnu.org Depends on: 107608 Target Milestone: --- +++ This bug was initially created as a clone of Bug #107608 +++ >From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608#c32 : FYI, most likely it's totally unrelated to this bug, for right now with latest gcc trunk and glibc trunk on x86-64, I still see the following iseqsig errors: FAIL: math/test-double-iseqsig FAIL: math/test-float-iseqsig FAIL: math/test-float128-iseqsig FAIL: math/test-float32-iseqsig FAIL: math/test-float32x-iseqsig FAIL: math/test-float64-iseqsig FAIL: math/test-float64x-iseqsig FAIL: math/test-ldouble-iseqsig I think this can be reduced to e.g. __attribute__((noipa)) int foo (float x, float y) { _Bool cmp1 = x <= y; _Bool cmp2 = x >= y; if (cmp1 && cmp2) return 1; else if (!cmp1 && !cmp2) return -1; return 0; } int main () { if (foo (0.0f, __builtin_nanf ("")) != -1) __builtin_abort (); if (foo (__builtin_nanf (""), -42.0f) != -1) __builtin_abort (); if (foo (0.0f, -0.0f) != 1) __builtin_abort (); if (foo (42.0f, 42.0f) != 1) __builtin_abort (); if (foo (42.0f, -0.0f) != 0) __builtin_abort (); if (foo (0.0f, -42.0f) != 0) __builtin_abort (); return 0; } and is fairly different from the PR106805 bug, which is about iseqsig too, but in that case the ranges of the operands are singletons and there are issues not just on the trunk, but also on GCC 12 etc. (though more on the trunk). In the above short testcase, it works fine in GCC 12 and only fails on the trunk. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 [Bug 107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c