[Bug c++/85747] suboptimal code without constexpr

2021-12-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-12-27 Severity|normal

[Bug c++/85747] suboptimal code without constexpr

2021-12-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Andrew Pinski changed: What|Removed |Added CC||bmburstein at gmail dot com --- Comment

[Bug c++/85747] suboptimal code without constexpr

2021-12-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Andrew Pinski changed: What|Removed |Added CC||eyalroz1 at gmx dot com --- Comment #11

[Bug c++/85747] suboptimal code without constexpr

2021-12-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #12 from Andrew Pinski --- *** Bug 89922 has been marked as a duplicate of this bug. ***

[Bug c++/85747] suboptimal code without constexpr

2018-08-06 Thread zamazan4ik at tut dot by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Alexander Zaitsev changed: What|Removed |Added CC||zamazan4ik at tut dot by --- Comment

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Richard Biener changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #2 from Marc Glisse --- (In reply to Antony Polukhin from comment #0) > Could the compiler detect that `a[7]` holds values known at compile time and > force the constexpr on `sort(a + 0, a + 7);`? There has to be a limit. If I write

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #3 from Antony Polukhin --- (In reply to Richard Biener from comment #1) > What's the reason for writing the code as you pasted it? I've tried to provide a simplified case. In real world `generate()` function will have some arguments

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #4 from Antony Polukhin --- (In reply to Marc Glisse from comment #2) > (In reply to Antony Polukhin from comment #0) > > Could the compiler detect that `a[7]` holds values known at compile time and > > force the constexpr on `sort(a

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #5 from Marc Glisse --- (In reply to Antony Polukhin from comment #4) > Does providing some kind of -Oon-the-fly switch solves the issue with JIT > compile times while still allows more optimizations for the traditional non > JIT -O2

[Bug c++/85747] suboptimal code without constexpr

2018-05-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #6

[Bug c++/85747] suboptimal code without constexpr

2018-05-14 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85747 --- Comment #7 from Antony Polukhin --- (In reply to Jakub Jelinek from comment #6) > IMHO just use constexpr if you care about compile time evaluation > guarantees, that is what it has been added for. Fair point. Overcomplicated logic on the fr