[Bug c++/102470] C++20 NTTP causes ICE

2023-11-16 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470

Patrick Palka  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 CC||ppalka at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Patrick Palka  ---
Fixed by r13-4807, so let's call this a dup of PR103346

*** This bug has been marked as a duplicate of bug 103346 ***

[Bug c++/102470] C++20 NTTP causes ICE

2023-11-15 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470

Arthur O'Dwyer  changed:

   What|Removed |Added

 CC||arthur.j.odwyer at gmail dot 
com

--- Comment #2 from Arthur O'Dwyer  ---
Segfaults starting in GCC 9.1 (the first release with class NTTPs) until 12.3,
succeeds fine in GCC 13.1 and later.
Reduced: https://compiler-explorer.com/z/Kea5ar6MM

struct MA { int x; };
template constexpr int mao = 1;
template struct AST {};
template using AS = AST;
template using ASF = AS>;

: In substitution of 'template using AS = AST<((const MA)ma).x>
[with MA ma = mao]':
:5:39:   required from here
:4:32: internal compiler error: Segmentation fault
4 | template using AS = AST;
  |^~
0x1bbabfe internal_error(char const*, ...)
0x109f844 strip_array_types(tree_node*)
0x8d3f2c cp_type_quals(tree_node const*)
0x88e40f tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
0x87b764 tsubst(tree_node*, tree_node*, int, tree_node*)
[...]

[Bug c++/102470] C++20 NTTP causes ICE

2021-09-23 Thread iDingDong at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470

--- Comment #1 from Kun Ge  ---
I misplaced the wrong piece of codes.

the code that actually triggered the error is:

//---
#include 
#include 

struct MemAttr {
std::size_t size;
std::size_t align;
};

template  constexpr MemAttr memAttrOf = MemAttr { .size =
sizeof(T), .align = alignof(T) };

template  using AlignedStorage =
::std::aligned_storage_t;

template  using AlignedStorageFor = AlignedStorage>;
//---