[Bug c++/102626] [c++20] compiler crash when invoking constexpr function in the constructor of template class

2024-01-22 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102626

Patrick Palka  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=86933,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=92969

--- Comment #5 from Patrick Palka  ---
PR86933, PR92969 and this all seem related.  GCC seems to mishandle a type
template parameter pack appearing in the return type of a pointer to data
member NTTP pack:

typename ...Ts, Ts S::* ...ms

[Bug c++/102626] [c++20] compiler crash when invoking constexpr function in the constructor of template class

2024-01-22 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102626

Hans-Peter Nilsson  changed:

   What|Removed |Added

 CC||hp at gcc dot gnu.org
   Last reconfirmed|2021-10-11 00:00:00 |2024-01-14 0:00

--- Comment #4 from Hans-Peter Nilsson  ---
Searching for a constexpr-related bug (not this one) I can confirm that (for
cris-elf at least) the bug is still there at r14-7232-gb468821eea8d
(the test-case in comment #2 with "-std=c++20 -O3")

[Bug c++/102626] [c++20] compiler crash when invoking constexpr function in the constructor of template class

2021-10-11 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102626

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code

--- Comment #3 from Martin Liška  ---
Started with introduction of -std=c++2a (r8-3237-g026a79f70cf33f83).
Btw. clang accepts the code, so like ice-on-valid-code.

[Bug c++/102626] [c++20] compiler crash when invoking constexpr function in the constructor of template class

2021-10-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102626

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Slightly reduced:
template  struct P;

template 
struct P {
  static constexpr int size() { return (sizeof(S{}.*ms) + ...); }
  int sz;
  P() : sz(size()) {}
};
struct A { int x, y; };
auto p = P();

[Bug c++/102626] [c++20] compiler crash when invoking constexpr function in the constructor of template class

2021-10-11 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102626

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2021-10-11
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Confirmed.