[Bug rtl-optimization/99320] constexpr defined arrays within constexpr functions would benefit from lookup-tables

2021-03-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99320

--- Comment #3 from Jakub Jelinek  ---
constexpr doesn't imply anything like that.
constexpr variables can still be odr-used, their address taken, compared etc.

[Bug rtl-optimization/99320] constexpr defined arrays within constexpr functions would benefit from lookup-tables

2021-03-01 Thread gcc-bugs at marehr dot dialup.fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99320

--- Comment #2 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
You are right, it seems to be the same issue except that my function is
constexpr, and I can't use `static constexpr ...` within the function, but
Barry mentioned that use case already.

You mentioned something that gcc needs to prove that this is safe, but I think
my use case is "safe" since it is constexpr :)

[Bug rtl-optimization/99320] constexpr defined arrays within constexpr functions would benefit from lookup-tables

2021-03-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99320

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Looks like a dup of PR99091 to me.