[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-27 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #50 from rguenther at suse dot de --- On Fri, 27 Jan 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > --- Comment #49 from Jakub Jelinek --- > (In reply to rguent...@suse.de from

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #49 from Jakub Jelinek --- (In reply to rguent...@suse.de from comment #47) > > Glibc already changed the code from Inf/Inf to (x - x) / (x - x) where x (x - x) / (x - x) is 0 / 0, not Inf / Inf. Anyway, for frange potential in

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-27 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #48 from Xi Ruoyao --- (In reply to rguent...@suse.de from comment #47) > On Fri, 27 Jan 2023, xry111 at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > > > --- Comment #46 from Xi Ruoyao ---

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-27 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #47 from rguenther at suse dot de --- On Fri, 27 Jan 2023, xry111 at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > --- Comment #46 from Xi Ruoyao --- > (In reply to Richard Biener from comment

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-27 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #46 from Xi Ruoyao --- (In reply to Richard Biener from comment #45) > (In reply to Xi Ruoyao from comment #44) > > (In reply to rguent...@suse.de from comment #43) > > > If the result is unused then no, GCC will happily elide

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #45 from Richard Biener --- (In reply to Xi Ruoyao from comment #44) > (In reply to rguent...@suse.de from comment #43) > > On Thu, 19 Jan 2023, xry111 at gcc dot gnu.org wrote: > > > > >

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-26 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #44 from Xi Ruoyao --- (In reply to rguent...@suse.de from comment #43) > On Thu, 19 Jan 2023, xry111 at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > > > --- Comment #42 from Xi Ruoyao ---

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #43 from rguenther at suse dot de --- On Thu, 19 Jan 2023, xry111 at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > --- Comment #42 from Xi Ruoyao --- > (In reply to Richard Biener from comment

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #42 from Xi Ruoyao --- (In reply to Richard Biener from comment #41) > We could fix the testcase with > > diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c > index 69c4f83250c..09273e445d2 100644 > ---

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #41 from Richard Biener --- We could fix the testcase with diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr95115.c index 69c4f83250c..09273e445d2 100644 --- a/gcc/testsuite/gcc.dg/pr95115.c +++

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #40 from Richard Biener --- (In reply to Richard Biener from comment #39) > But I still see > > FAIL: gcc.dg/pr95115.c execution test > > as of r13-5237-gaaf29ae6cdbaad That's removing the use of _3 = Inf / Inf; (probably

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #39 from Richard Biener --- But I still see FAIL: gcc.dg/pr95115.c execution test as of r13-5237-gaaf29ae6cdbaad

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 Aldy Hernandez changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #37 from Jakub Jelinek --- I guess so. But we should look at the glibc math failures/PR106805.

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-18 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #36 from Aldy Hernandez --- Can we close this PR?

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-16 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #35 from Florian Weimer --- I backported the fixes for building glibc to 2.34 last week, I really expect the testsuite to be clean there (on x86-64), and on later releases as well.

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-16 Thread romain.geissler at amadeus dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #34 from Romain Geissler --- >From what I wrote here https://sourceware.org/pipermail/libc-alpha/2022-November/143633.html apparently I already tried gcc 12 back in end of november 2022 and all float issues in glibc testsuite were

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #33 from Jakub Jelinek --- Isn't that PR106805 ? More importantly, do those FAIL also with GCC 12 or just the trunk?

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-16 Thread romain.geissler at amadeus dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #32 from Romain Geissler --- Hi, Thanks for the fix, indeed it has fixed quite some glibc maths tests ;) 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

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #31 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:844190af178c210a6aff6b7eb4dd8c6a49210ff9 commit r13-5179-g844190af178c210a6aff6b7eb4dd8c6a49210ff9 Author: Aldy Hernandez Date:

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-13 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 Aldy Hernandez changed: What|Removed |Added Attachment #54253|0 |1 is obsolete|

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-13 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #29 from Aldy Hernandez --- (In reply to Jakub Jelinek from comment #27) > "elide an overflow" should be probably "elide an overflow or division by > zero" I think, > because finite / 0.0 returns infinity and raises FE_DIVBYZERO

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-12 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #28 from Xi Ruoyao --- (In reply to Jakub Jelinek from comment #27) > For GCC 13, I think it is important that we e.g. don't miscompile glibc > libm, so > the libm testsuite should be clean. PR107967 fixed some of the failures, >

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #27 from Jakub Jelinek --- "elide an overflow" should be probably "elide an overflow or division by zero" I think, because finite / 0.0 returns infinity and raises FE_DIVBYZERO rather than FE_OVERFLOW, even when it returns infinity

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-12 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 Aldy Hernandez changed: What|Removed |Added Attachment #54224|0 |1 is obsolete|

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #25 from Jakub Jelinek --- (In reply to Aldy Hernandez from comment #22) > Note that we currently can't represent +-inf or +-max, as we only have two > endpoints. So that would just be represented as VARYING. By +-inf I meant

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #24 from Aldy Hernandez --- (In reply to Andrew Macleod from comment #21) > (In reply to Richard Biener from comment #13) > > > Yes, the fact that ranger doesn't operate as a usual propagator with a > > lattice > > makes things

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 Jakub Jelinek changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org --- Comment

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #22 from Aldy Hernandez --- (In reply to Jakub Jelinek from comment #20) > (In reply to Aldy Hernandez from comment #16) > > Created attachment 54224 [details] > > untested patch > > > > Perhaps this would work. It solves the

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #21 from Andrew Macleod --- (In reply to Richard Biener from comment #13) > Yes, the fact that ranger doesn't operate as a usual propagator with a > lattice > makes things very difficult here. Note that my comment referred to code

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #20 from Jakub Jelinek --- (In reply to Aldy Hernandez from comment #16) > Created attachment 54224 [details] > untested patch > > Perhaps this would work. It solves the testcase, though I think we should > probably audit the

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #19 from rguenther at suse dot de --- On Tue, 10 Jan 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 > > --- Comment #18 from Jakub Jelinek --- > See #c10, I think even with comparisons

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #18 from Jakub Jelinek --- See #c10, I think even with comparisons we need to be careful. One thing is whether we can prove one of the branches will be unreachable, we can do that and replace that branch with __builtin_unreachable,

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #17 from Richard Biener --- (In reply to Aldy Hernandez from comment #16) > Created attachment 54224 [details] > untested patch > > Perhaps this would work. It solves the testcase, though I think we should > probably audit the

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #16 from Aldy Hernandez --- Created attachment 54224 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54224=edit untested patch Perhaps this would work. It solves the testcase, though I think we should probably audit the

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #15 from Aldy Hernandez --- (In reply to Richard Biener from comment #13) > Note that the constant folding routines generally refrain from folding > when that loses exceptions, it's just ranger when producing singleton > ranges and

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #14 from Richard Biener --- const_binop has /* Don't constant fold this floating point operation if the result has overflowed and flag_trapping_math. */ if (flag_trapping_math && MODE_HAS_INFINITIES

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-10 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #13 from Richard Biener --- (In reply to Aldy Hernandez from comment #12) > (In reply to Richard Biener from comment #6) > > (In reply to Jakub Jelinek from comment #0) > > > ... but then > > > comes dom2 and happily replaces > > >

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2023-01-09 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #12 from Aldy Hernandez --- (In reply to Richard Biener from comment #6) > (In reply to Jakub Jelinek from comment #0) > > ... but then > > comes dom2 and happily replaces > > _1 = 3.4028234663852885981170418348451692544e+38 *

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-12-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #11 from Richard Biener --- (In reply to Jakub Jelinek from comment #10) > Some extra food for thought: > void bar (void); > > void > foo (double x) > { > if (x >= -16.0 && x <= 16.0) > { > double y = x + 32.0; >

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-12-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #10 from Jakub Jelinek --- Some extra food for thought: void bar (void); void foo (double x) { if (x >= -16.0 && x <= 16.0) { double y = x + 32.0; double z = y * 42.5; if (z < 600.0 || z > 3000.0)

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-12-05 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #9 from Aldy Hernandez --- (In reply to Richard Biener from comment #8) > (In reply to Aldy Hernandez from comment #7) > > (In reply to Richard Biener from comment #6) > > > (In reply to Jakub Jelinek from comment #0) > > > > ...

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-12-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #8 from Richard Biener --- (In reply to Aldy Hernandez from comment #7) > (In reply to Richard Biener from comment #6) > > (In reply to Jakub Jelinek from comment #0) > > > ... but then > > > comes dom2 and happily replaces > > >

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-12-05 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #7 from Aldy Hernandez --- (In reply to Richard Biener from comment #6) > (In reply to Jakub Jelinek from comment #0) > > ... but then > > comes dom2 and happily replaces > > _1 = 3.4028234663852885981170418348451692544e+38 *

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-11-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 Richard Biener changed: What|Removed |Added Keywords||missed-optimization --- Comment #6

[Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c

2022-11-12 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608 --- Comment #5 from Xi Ruoyao --- After r13-3924 this brings PR95115 back. Note that Glibc has added an ugly hack for RISC-V and old compilers, but other ports may be haunted as well.